This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[obv] Print debug message when debug_threads is true
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Wed, 27 Feb 2013 21:27:59 +0800
- Subject: [obv] Print debug message when debug_threads is true
Hi,
When working on dprintf bugs, I find this line of debug message is
printed out unconditionally. This patch adds a condition checking.
It is obvious and committed.
gdb/gdbserver:
2013-02-27 Yao Qi <yao@codesourcery.com>
* server.c (process_point_options): Print debug message when
debug_threads is true.
---
gdb/gdbserver/server.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 371647c..768eae7 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -2860,7 +2860,8 @@ process_point_options (CORE_ADDR point_addr, char **packet)
if (*dataptr == 'X')
{
/* Conditional expression. */
- fprintf (stderr, "Found breakpoint condition.\n");
+ if (debug_threads)
+ fprintf (stderr, "Found breakpoint condition.\n");
add_breakpoint_condition (point_addr, &dataptr);
}
else if (strncmp (dataptr, "cmds:", strlen ("cmds:")) == 0)
--
1.7.7.6