This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]