* [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
* Re: [patch] Differentiate dbg msg on IPA and gdbserver
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
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2012-01-04 12:02 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
On 01/04/2012 03:14 AM, Yao Qi wrote:
> 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
Wouldn't that be better "ipa/tracepoint:" ? Anyway, okay.
--
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] Differentiate dbg msg on IPA and gdbserver
2012-01-04 12:02 ` Pedro Alves
@ 2012-01-04 14:37 ` Yao Qi
0 siblings, 0 replies; 3+ messages in thread
From: Yao Qi @ 2012-01-04 14:37 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches
On 01/04/2012 08:02 PM, Pedro Alves wrote:
> Wouldn't that be better "ipa/tracepoint:" ? Anyway, okay.
Thanks for the review. This is what I committed.
http://sourceware.org/ml/gdb-cvs/2012-01/msg00045.html
--
Yao (é½å°§)
2012-01-04 Yao Qi <yao@codesourcery.com>
* tracepoint.c (trace_vdebug): Differentiate debug message
between gdbserver and IPA.
Index: gdb/gdbserver/tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/tracepoint.c,v
retrieving revision 1.40
diff -u -r1.40 tracepoint.c
--- gdb/gdbserver/tracepoint.c 4 Jan 2012 08:17:24 -0000 1.40
+++ gdb/gdbserver/tracepoint.c 4 Jan 2012 14:33:48 -0000
@@ -63,7 +63,11 @@
va_start (ap, fmt);
vsprintf (buf, fmt, ap);
+#ifdef IN_PROCESS_AGENT
+ fprintf (stderr, "ipa/tracepoint: %s\n", buf);
+#else
fprintf (stderr, "gdbserver/tracepoint: %s\n", buf);
+#endif
va_end (ap);
}
^ 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