From: Yao Qi <yao@codesourcery.com>
To: Pedro Alves <alves.ped@gmail.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [patch] Turn on dbg msg of IPA along with gdbserver's
Date: Wed, 04 Jan 2012 14:55:00 -0000 [thread overview]
Message-ID: <4F04684E.1020501@codesourcery.com> (raw)
In-Reply-To: <4F043FC6.3070201@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1111 bytes --]
On 01/04/2012 08:02 PM, Pedro Alves wrote:
> Since it's in the inferior, I just do "print debug_threads = 1"
> from gdb. It won't work if the ipa is stripped though, so I won't
> object to something like this.
>
Well, I don't mind to turn debug flag on in this way. However,
`debug_threads' is confusing here. How about change this flag to
`debug_agent'?
>> Since gdbserver has been a good
>> mechanism to access gdb_agent_XXX variables in inferior's space, we can
>> do similar thing to turn on IPA's debug flag.
>>
>> This patch renames debug flag `debug_threads' to `gdb_agent_debug', and
>> let gdbserver to set it if `debug_threads' (in gdbserver's space) is
>> true. For the user's perspective, if gdbserver option --debug is on,
>> IPA's debugging message comes into the gdbserver's debug message.
>>
>> OK for mainline?
>
> Sorry, not in this form. It's quite useful to be able to turn
> gdbserver's and the IPA's debug output independently. I'd like to
> retain that possibility.
That is fine to me. It is reasonable to decouple gdbserver's and IPA's
debug output.
--
Yao (é½å°§)
[-- Attachment #2: 0003-set-debug-flag-for-ipa.patch --]
[-- Type: text/x-patch, Size: 1014 bytes --]
2012-01-04 Yao Qi <yao@codesourcery.com>
* tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
defined.
[IN_PROCESS_AGENT] (debug_agent): New global variable.
---
gdb/gdbserver/tracepoint.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index 524fa77..ba0bc1f 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -67,9 +67,13 @@ trace_vdebug (const char *fmt, ...)
va_end (ap);
}
+#ifdef IN_PROCESS_AGENT
+#define debug_threads debug_agent
+#endif
+
#define trace_debug_1(level, fmt, args...) \
do { \
- if (level <= debug_threads) \
+ if (level <= debug_threads) \
trace_vdebug ((fmt), ##args); \
} while (0)
@@ -366,7 +370,7 @@ tracepoint_look_up_symbols (void)
GDBserver side. */
#ifdef IN_PROCESS_AGENT
-int debug_threads = 0;
+int debug_agent = 0;
int
read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
--
1.7.0.4
next prev parent reply other threads:[~2012-01-04 14:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-04 3:40 Yao Qi
2012-01-04 12:02 ` Pedro Alves
2012-01-04 14:55 ` Yao Qi [this message]
2012-01-05 14:47 ` Pedro Alves
2012-01-06 6:01 ` [committed] : " Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F04684E.1020501@codesourcery.com \
--to=yao@codesourcery.com \
--cc=alves.ped@gmail.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).