* [patch] Increase the bar of printing `handling possible serial event'
@ 2011-11-10 6:28 Yao Qi
2011-11-10 19:41 ` Pedro Alves
0 siblings, 1 reply; 4+ messages in thread
From: Yao Qi @ 2011-11-10 6:28 UTC (permalink / raw)
To: gdb-patches
Hi,
When I debug gdbserver by setting debug_thread to 1, I get many lines
of `handling possible serial event' in log, which dose not carry any
useful information for debugging purpose.
This patch is to increase the threshold of printing this sentence. Or we
may remove this print completely, because I can't figure out a case
some one wants to read many lines of `handling possible serial event'
in log.
--
Yao (é½å°§)
* server.c (handle_serial_event): Increase the bar to print
debug message.
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 4612457..845ae3a 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -3217,7 +3217,7 @@ process_serial_event (void)
int
handle_serial_event (int err, gdb_client_data client_data)
{
- if (debug_threads)
+ if (debug_threads > 3)
fprintf (stderr, "handling possible serial event\n");
/* Really handle it. */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] Increase the bar of printing `handling possible serial event'
2011-11-10 6:28 [patch] Increase the bar of printing `handling possible serial event' Yao Qi
@ 2011-11-10 19:41 ` Pedro Alves
2011-11-10 22:04 ` Stan Shebs
2011-11-11 6:10 ` Yao Qi
0 siblings, 2 replies; 4+ messages in thread
From: Pedro Alves @ 2011-11-10 19:41 UTC (permalink / raw)
To: gdb-patches; +Cc: Yao Qi
On Thursday 10 November 2011 06:27:34, Yao Qi wrote:
> Hi,
> When I debug gdbserver by setting debug_thread to 1, I get many lines
> of `handling possible serial event' in log, which dose not carry any
> useful information for debugging purpose.
>
> This patch is to increase the threshold of printing this sentence. Or we
> may remove this print completely, because I can't figure out a case
> some one wants to read many lines of `handling possible serial event'
> in log.
I've found it more than once very useful when debugging non-stop/async mode
issues, where the order of serial and target events isn't predictable,
and knowing when a packet was just handled can help figure out
following weird behaviors.
If it bothers so much, I could go with outputting it only when non_stop is
on. Just bumping is not good, because you can't set debug_thread to anything
other than 1 or 0 without recompiling gdbserver, and that's not good when
asking users for logs.
--
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] Increase the bar of printing `handling possible serial event'
2011-11-10 19:41 ` Pedro Alves
@ 2011-11-10 22:04 ` Stan Shebs
2011-11-11 6:10 ` Yao Qi
1 sibling, 0 replies; 4+ messages in thread
From: Stan Shebs @ 2011-11-10 22:04 UTC (permalink / raw)
To: gdb-patches
On 11/10/11 11:41 AM, Pedro Alves wrote:
> On Thursday 10 November 2011 06:27:34, Yao Qi wrote:
>> Hi,
>> When I debug gdbserver by setting debug_thread to 1, I get many lines
>> of `handling possible serial event' in log, which dose not carry any
>> useful information for debugging purpose.
>>
>> This patch is to increase the threshold of printing this sentence. Or we
>> may remove this print completely, because I can't figure out a case
>> some one wants to read many lines of `handling possible serial event'
>> in log.
> I've found it more than once very useful when debugging non-stop/async mode
> issues, where the order of serial and target events isn't predictable,
> and knowing when a packet was just handled can help figure out
> following weird behaviors.
>
> If it bothers so much, I could go with outputting it only when non_stop is
> on. Just bumping is not good, because you can't set debug_thread to anything
> other than 1 or 0 without recompiling gdbserver, and that's not good when
> asking users for logs.
>
--debug=2 ?
Might as well invest, the poor code is getting plenty of use/abuse. :-)
Stan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] Increase the bar of printing `handling possible serial event'
2011-11-10 19:41 ` Pedro Alves
2011-11-10 22:04 ` Stan Shebs
@ 2011-11-11 6:10 ` Yao Qi
1 sibling, 0 replies; 4+ messages in thread
From: Yao Qi @ 2011-11-11 6:10 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches
On 11/11/2011 03:41 AM, Pedro Alves wrote:
> I've found it more than once very useful when debugging non-stop/async mode
> issues, where the order of serial and target events isn't predictable,
> and knowing when a packet was just handled can help figure out
> following weird behaviors.
>
OK, I understand.
> If it bothers so much, I could go with outputting it only when non_stop is
No. "--debug=N" is a right way to go in long term.
--
Yao (é½å°§)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-11 6:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-10 6:28 [patch] Increase the bar of printing `handling possible serial event' Yao Qi
2011-11-10 19:41 ` Pedro Alves
2011-11-10 22:04 ` Stan Shebs
2011-11-11 6:10 ` Yao Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox