This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 06/13] Use debug_printf in debug_reg_change_callback
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 18 Aug 2015 16:53:12 +0100
- Subject: [PATCH 06/13] Use debug_printf in debug_reg_change_callback
- Authentication-results: sourceware.org; auth=none
- References: <1439913199-22882-1-git-send-email-yao dot qi at linaro dot org>
gdb:
2015-08-18 Yao Qi <yao.qi@linaro.org>
* aarch64-linux-nat.c (debug_reg_change_callback): Use
debug_printf.
gdb/gdbserver:
2015-08-18 Yao Qi <yao.qi@linaro.org>
* linux-aarch64-low.c (debug_reg_change_callback): Use
debug_printf.
---
gdb/aarch64-linux-nat.c | 21 +++++++++------------
gdb/gdbserver/linux-aarch64-low.c | 18 +++++++++---------
2 files changed, 18 insertions(+), 21 deletions(-)
diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c
index d530019..4ccbe9e 100644
--- a/gdb/aarch64-linux-nat.c
+++ b/gdb/aarch64-linux-nat.c
@@ -177,13 +177,11 @@ debug_reg_change_callback (struct lwp_info *lwp, void *ptr)
if (show_debug_regs)
{
- fprintf_unfiltered (gdb_stdlog,
- "debug_reg_change_callback: \n\tOn entry:\n");
- fprintf_unfiltered (gdb_stdlog,
- "\tpid%d, dr_changed_bp=0x%s, "
- "dr_changed_wp=0x%s\n",
- pid, phex (info->dr_changed_bp, 8),
- phex (info->dr_changed_wp, 8));
+ debug_printf ("debug_reg_change_callback: \n\tOn entry:\n");
+ debug_printf ("\tpid%d, dr_changed_bp=0x%s, "
+ "dr_changed_wp=0x%s\n", pid,
+ phex (info->dr_changed_bp, 8),
+ phex (info->dr_changed_wp, 8));
}
dr_changed_ptr = is_watchpoint ? &info->dr_changed_wp
@@ -206,11 +204,10 @@ debug_reg_change_callback (struct lwp_info *lwp, void *ptr)
if (show_debug_regs)
{
- fprintf_unfiltered (gdb_stdlog,
- "\tOn exit:\n\tpid%d, dr_changed_bp=0x%s, "
- "dr_changed_wp=0x%s\n",
- pid, phex (info->dr_changed_bp, 8),
- phex (info->dr_changed_wp, 8));
+ debug_printf ("\tOn exit:\n\tpid%d, dr_changed_bp=0x%s, "
+ "dr_changed_wp=0x%s\n", pid,
+ phex (info->dr_changed_bp, 8),
+ phex (info->dr_changed_wp, 8));
}
/* Continue the iteration. */
diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index 0dfb729..0ca2b0b 100644
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -261,11 +261,11 @@ debug_reg_change_callback (struct lwp_info *lwp, void *ptr)
if (show_debug_regs)
{
- fprintf (stderr, "debug_reg_change_callback: \n\tOn entry:\n");
- fprintf (stderr, "\tpid%d, dr_changed_bp=0x%s, "
- "dr_changed_wp=0x%s\n",
- pid, phex (info->dr_changed_bp, 8),
- phex (info->dr_changed_wp, 8));
+ debug_printf ("debug_reg_change_callback: \n\tOn entry:\n");
+ debug_printf ("\tpid%d, dr_changed_bp=0x%s, "
+ "dr_changed_wp=0x%s\n", pid,
+ phex (info->dr_changed_bp, 8),
+ phex (info->dr_changed_wp, 8));
}
dr_changed_ptr = is_watchpoint ? &info->dr_changed_wp
@@ -288,10 +288,10 @@ debug_reg_change_callback (struct lwp_info *lwp, void *ptr)
if (show_debug_regs)
{
- fprintf (stderr, "\tOn exit:\n\tpid%d, dr_changed_bp=0x%s, "
- "dr_changed_wp=0x%s\n",
- pid, phex (info->dr_changed_bp, 8),
- phex (info->dr_changed_wp, 8));
+ debug_printf ("\tOn exit:\n\tpid%d, dr_changed_bp=0x%s, "
+ "dr_changed_wp=0x%s\n", pid,
+ phex (info->dr_changed_bp, 8),
+ phex (info->dr_changed_wp, 8));
}
return 0;
--
1.9.1