Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Differentiate dbg msg on IPA and gdbserver
@ 2012-01-04  3:14 Yao Qi
  2012-01-04 12:02 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Yao Qi @ 2012-01-04  3:14 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

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 (齐尧)

[-- Attachment #2: 0004-print-debug-msg.patch --]
[-- Type: text/x-patch, Size: 670 bytes --]


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-04 14:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-04  3:14 [patch] Differentiate dbg msg on IPA and gdbserver Yao Qi
2012-01-04 12:02 ` Pedro Alves
2012-01-04 14:37   ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox