This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb/gdb-8.0-branch] Python: Fix indentation in py-record-btrace.c
- From: Tim Wiederhake <twiederh at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 4 May 2017 07:06:08 -0000
- Subject: [binutils-gdb/gdb-8.0-branch] Python: Fix indentation in py-record-btrace.c
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d4c682630c6ff6c8e159b833e7a8f2915853369a
commit d4c682630c6ff6c8e159b833e7a8f2915853369a
Author: Tim Wiederhake <tim.wiederhake@intel.com>
Date: Thu May 4 09:05:00 2017 +0200
Python: Fix indentation in py-record-btrace.c
Diff:
---
gdb/ChangeLog | 6 +++++
gdb/python/py-record-btrace.c | 60 +++++++++++++++++++++----------------------
2 files changed, 36 insertions(+), 30 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8d39588..c666914 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2017-05-04 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-04-28 Yao Qi <yao.qi@linaro.org>
* mips-linux-nat.c (mips_linux_new_thread): Use ptid method
diff --git a/gdb/python/py-record-btrace.c b/gdb/python/py-record-btrace.c
index 6d08121..6ba9d7e 100644
--- a/gdb/python/py-record-btrace.c
+++ b/gdb/python/py-record-btrace.c
@@ -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. */