Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
binutils-gdb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastien Michelland
binutils-gdb
Commits
8d0050ea
Commit
8d0050ea
authored
7 years ago
by
Tim Wiederhake
Browse files
Options
Downloads
Patches
Plain Diff
Python: Fix indentation in py-record-btrace.c
parent
fe50e98c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gdb/ChangeLog
+6
-0
6 additions, 0 deletions
gdb/ChangeLog
gdb/python/py-record-btrace.c
+30
-30
30 additions, 30 deletions
gdb/python/py-record-btrace.c
with
36 additions
and
30 deletions
gdb/ChangeLog
+
6
−
0
View file @
8d0050ea
2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
* python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
indentation.
2017-05-01 Joel Brobecker <brobecker@adacore.com>
* MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
...
...
This diff is collapsed.
Click to expand it.
gdb/python/py-record-btrace.c
+
30
−
30
View file @
8d0050ea
...
...
@@ -36,24 +36,24 @@
#endif
#define BTPY_REQUIRE_VALID_INSN(obj, iter) \
do { \
struct thread_info *tinfo = find_thread_ptid (obj->ptid); \
if (tinfo == NULL || btrace_is_empty (tinfo)) \
return PyErr_Format (gdbpy_gdb_error, _("Empty branch trace."));\
if (0 == btrace_find_insn_by_number (&iter, &tinfo->btrace, \
obj->number)) \
return PyErr_Format (gdbpy_gdb_error, _("No such instruction."));\
} while (0)
do {
\
struct thread_info *tinfo = find_thread_ptid (obj->ptid); \
if (tinfo == NULL || btrace_is_empty (tinfo)) \
return PyErr_Format (gdbpy_gdb_error, _("Empty branch trace."));
\
if (0 == btrace_find_insn_by_number (&iter, &tinfo->btrace,
\
obj->number))
\
return PyErr_Format (gdbpy_gdb_error, _("No such instruction."));
\
} while (0)
#define BTPY_REQUIRE_VALID_CALL(obj, iter) \
do { \
struct thread_info *tinfo = find_thread_ptid (obj->ptid); \
if (tinfo == NULL || btrace_is_empty (tinfo)) \
return PyErr_Format (gdbpy_gdb_error, _("Empty branch trace."));\
if (0 == btrace_find_call_by_number (&iter, &tinfo->btrace, \
obj->number)) \
return PyErr_Format (gdbpy_gdb_error, _("No such call segment."));\
} while (0)
do {
\
struct thread_info *tinfo = find_thread_ptid (obj->ptid); \
if (tinfo == NULL || btrace_is_empty (tinfo)) \
return PyErr_Format (gdbpy_gdb_error, _("Empty branch trace."));
\
if (0 == btrace_find_call_by_number (&iter, &tinfo->btrace,
\
obj->number))
\
return PyErr_Format (gdbpy_gdb_error, _("No such call segment."));\
} while (0)
/* This can either be a btrace instruction or a function call segment,
depending on the chosen type. */
...
...
@@ -842,26 +842,26 @@ recpy_bt_instruction_history (PyObject *self, void *closure)
PyObject
*
recpy_bt_function_call_history
(
PyObject
*
self
,
void
*
closure
)
{
struct
thread_info
*
const
tinfo
=
find_thread_ptid
(
inferior_ptid
);
struct
btrace_call_iterator
iterator
;
unsigned
long
first
=
0
;
unsigned
long
last
=
0
;
struct
thread_info
*
const
tinfo
=
find_thread_ptid
(
inferior_ptid
);
struct
btrace_call_iterator
iterator
;
unsigned
long
first
=
0
;
unsigned
long
last
=
0
;
if
(
tinfo
==
NULL
)
Py_RETURN_NONE
;
if
(
tinfo
==
NULL
)
Py_RETURN_NONE
;
btrace_fetch
(
tinfo
);
btrace_fetch
(
tinfo
);
if
(
btrace_is_empty
(
tinfo
))
Py_RETURN_NONE
;
if
(
btrace_is_empty
(
tinfo
))
Py_RETURN_NONE
;
btrace_call_begin
(
&
iterator
,
&
tinfo
->
btrace
);
first
=
btrace_call_number
(
&
iterator
);
btrace_call_begin
(
&
iterator
,
&
tinfo
->
btrace
);
first
=
btrace_call_number
(
&
iterator
);
btrace_call_end
(
&
iterator
,
&
tinfo
->
btrace
);
last
=
btrace_call_number
(
&
iterator
);
btrace_call_end
(
&
iterator
,
&
tinfo
->
btrace
);
last
=
btrace_call_number
(
&
iterator
);
return
btpy_list_new
(
inferior_ptid
,
first
,
last
,
1
,
&
btpy_call_type
);
return
btpy_list_new
(
inferior_ptid
,
first
,
last
,
1
,
&
btpy_call_type
);
}
/* Implementation of BtraceRecord.goto (self, BtraceInstruction) -> None. */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment