This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] Differentiate dbg msg on IPA and gdbserver
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Wed, 4 Jan 2012 11:14:16 +0800
- Subject: [patch] Differentiate dbg msg on IPA and gdbserver
Hi,
I find debug message printed from IPA and gdbserver are both prefixed
with "gdbserver/tracepoint". It is unclear. This patch is to give
different prefix of debug message for IPA and gdbserver.
With this patch applied, this debug log becomes,
gdbserver/tracepoint: signalling helper thread
gdbserver/tracepoint: waiting for helper thread's response
-gdbserver/tracepoint: Returning static tracepoint
+ipa: Returning static tracepoint
gdbserver/tracepoint: helper thread's response received
It becomes clear to see the interaction between gdbserver and IPA. OK
form mainline?
--
Yao (éå)
2012-01-04 Yao Qi <yao@codesourcery.com>
* tracepoint.c (trace_vdebug): Differentiate debug message
between gdbserver and IPA.
---
gdb/gdbserver/tracepoint.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index 360c14b..103a17d 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -63,7 +63,11 @@ trace_vdebug (const char *fmt, ...)
va_start (ap, fmt);
vsprintf (buf, fmt, ap);
+#ifdef IN_PROCESS_AGENT
+ fprintf (stderr, "ipa: %s\n", buf);
+#else
fprintf (stderr, "gdbserver/tracepoint: %s\n", buf);
+#endif
va_end (ap);
}
--
1.7.0.4