* [rfa/target/doc] Print less with "set debug target 1"
2004-03-19 0:09 [rfa/target/doc] Print less with "set debug target 1" Daniel Jacobowitz
@ 2004-03-06 23:08 ` Daniel Jacobowitz
2004-03-08 22:49 ` Michael Snyder
` (2 subsequent siblings)
3 siblings, 0 replies; 16+ messages in thread
From: Daniel Jacobowitz @ 2004-03-06 23:08 UTC (permalink / raw)
To: gdb-patches; +Cc: cagney, eliz
This is something that's always bugged me. I wanted to track a problem in
the testsuite using "set debug target 1", but the output was so incredibly
noisy (because of libthread_db) that everything timed out. This patch
changes "set debug target 1" to only print the first line of a memory
transfer, and documents "set debug target 2" to print the whole thing.
Seem OK?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2004-03-06 Daniel Jacobowitz <drow@mvista.com>
* target.c (debug_to_xfer_memory): If targetdebug is 1, don't
print the whole transfer.
2004-03-06 Daniel Jacobowitz <drow@mvista.com>
* gdb.texinfo (Debugging Output): Document values for "set debug
target".
Index: target.c
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gdb/target.c,v
retrieving revision 1.70
diff -u -p -r1.70 target.c
--- target.c 19 Jan 2004 16:49:35 -0000 1.70
+++ target.c 6 Mar 2004 19:47:07 -0000
@@ -1829,8 +1829,6 @@ debug_to_xfer_memory (CORE_ADDR memaddr,
(unsigned int) memaddr, /* possable truncate long long */
len, write ? "write" : "read", retval);
-
-
if (retval > 0)
{
int i;
@@ -1839,7 +1837,15 @@ debug_to_xfer_memory (CORE_ADDR memaddr,
for (i = 0; i < retval; i++)
{
if ((((long) &(myaddr[i])) & 0xf) == 0)
- fprintf_unfiltered (gdb_stdlog, "\n");
+ {
+ if (targetdebug < 2 && i > 0)
+ {
+ fprintf_unfiltered (gdb_stdlog, " ...");
+ break;
+ }
+ fprintf_unfiltered (gdb_stdlog, "\n");
+ }
+
fprintf_unfiltered (gdb_stdlog, " %02x", myaddr[i] & 0xff);
}
}
Index: doc/gdb.texinfo
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.199
diff -u -p -r1.199 gdb.texinfo
--- doc/gdb.texinfo 29 Feb 2004 02:57:24 -0000 1.199
+++ doc/gdb.texinfo 6 Mar 2004 23:04:55 -0000
@@ -13434,7 +13434,9 @@ info.
@item set debug target
Turns on or off display of @value{GDBN} target debugging info. This info
includes what is going on at the target level of GDB, as it happens. The
-default is off.
+default is 0. Set it to 1 to track events, and to 2 to also track the
+value of large memory transfers. This flag must be set before connecting
+to the target or saying @code{run}.
@kindex show debug target
@item show debug target
Displays the current state of displaying @value{GDBN} target debugging
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [rfa/target/doc] Print less with "set debug target 1"
2004-03-19 0:09 ` Eli Zaretskii
@ 2004-03-07 5:39 ` Eli Zaretskii
2004-03-09 0:12 ` Andrew Cagney
2004-03-19 0:09 ` Michael Snyder
2 siblings, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2004-03-07 5:39 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches, cagney
> Date: Sat, 6 Mar 2004 18:08:35 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> Seem OK?
Thanks for the documentation patch, but I have 2 minor comments:
> @item set debug target
> Turns on or off display of @value{GDBN} target debugging info. This info
> includes what is going on at the target level of GDB, as it happens. The
> -default is off.
> +default is 0. Set it to 1 to track events, and to 2 to also track the
> +value of large memory transfers. This flag must be set before connecting
> +to the target or saying @code{run}.
. I'm not sure I understand this sentence--do you mean to say that
_if_ the flag is set, it must be set _before_ connecting and
before "run"? If so, I suggest to use @emph and/or @strong to
make sure the reader understands you, and maybe rephrase slightly
to make sure the wording is less ambiguous.
. Since in this context "run" is something the user types, it
should be @kbd{run}, not @code{run}.
Otherwise, it is okay to go in.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [rfa/target/doc] Print less with "set debug target 1"
2004-03-19 0:09 ` Michael Snyder
@ 2004-03-08 22:48 ` Michael Snyder
0 siblings, 0 replies; 16+ messages in thread
From: Michael Snyder @ 2004-03-08 22:48 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Daniel Jacobowitz, gdb-patches, cagney
Eli Zaretskii wrote:
>>Date: Sat, 6 Mar 2004 18:08:35 -0500
>>From: Daniel Jacobowitz <drow@false.org>
>>
>>Seem OK?
>
>
> Thanks for the documentation patch, but I have 2 minor comments:
>
>
>> @item set debug target
>> Turns on or off display of @value{GDBN} target debugging info. This info
>> includes what is going on at the target level of GDB, as it happens. The
>>-default is off.
>>+default is 0. Set it to 1 to track events, and to 2 to also track the
>>+value of large memory transfers. This flag must be set before connecting
>>+to the target or saying @code{run}.
>
>
> . I'm not sure I understand this sentence--do you mean to say that
> _if_ the flag is set, it must be set _before_ connecting and
> before "run"?
Yeah, that's correct. "set debug target" must be given
before the target command. If I remember correctly, it
inserts a layer in the target stack.
> If so, I suggest to use @emph and/or @strong to
> make sure the reader understands you, and maybe rephrase slightly
> to make sure the wording is less ambiguous.
>
> . Since in this context "run" is something the user types, it
> should be @kbd{run}, not @code{run}.
>
> Otherwise, it is okay to go in.
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [rfa/target/doc] Print less with "set debug target 1"
2004-03-19 0:09 [rfa/target/doc] Print less with "set debug target 1" Daniel Jacobowitz
2004-03-06 23:08 ` Daniel Jacobowitz
@ 2004-03-08 22:49 ` Michael Snyder
2004-03-19 0:09 ` Michael Snyder
2004-03-09 16:18 ` Daniel Jacobowitz
2004-03-19 0:09 ` Eli Zaretskii
3 siblings, 1 reply; 16+ messages in thread
From: Michael Snyder @ 2004-03-08 22:49 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches, cagney, eliz
Daniel Jacobowitz wrote:
> This is something that's always bugged me. I wanted to track a problem in
> the testsuite using "set debug target 1", but the output was so incredibly
> noisy (because of libthread_db) that everything timed out. This patch
> changes "set debug target 1" to only print the first line of a memory
> transfer, and documents "set debug target 2" to print the whole thing.
>
> Seem OK?
>
I think it's a great idea -- my only concern is with legacy issues.
But I doubt if more than 3 people in the world ever use it, so I'm
in favor.
M
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [rfa/target/doc] Print less with "set debug target 1"
2004-03-19 0:09 ` Eli Zaretskii
2004-03-07 5:39 ` Eli Zaretskii
@ 2004-03-09 0:12 ` Andrew Cagney
2004-03-19 0:09 ` Andrew Cagney
2004-03-19 0:09 ` Michael Snyder
2 siblings, 1 reply; 16+ messages in thread
From: Andrew Cagney @ 2004-03-09 0:12 UTC (permalink / raw)
To: Eli Zaretskii, Daniel Jacobowitz; +Cc: gdb-patches
>>Date: Sat, 6 Mar 2004 18:08:35 -0500
>>> From: Daniel Jacobowitz <drow@false.org>
>>>
>>> Seem OK?
>
>
> Thanks for the documentation patch, but I have 2 minor comments:
>
>
>>> @item set debug target
>>> Turns on or off display of @value{GDBN} target debugging info. This info
>>> includes what is going on at the target level of GDB, as it happens. The
>>> -default is off.
>>> +default is 0. Set it to 1 to track events, and to 2 to also track the
>>> +value of large memory transfers. This flag must be set before connecting
>>> +to the target or saying @code{run}.
>
>
> . I'm not sure I understand this sentence--do you mean to say that
> _if_ the flag is set, it must be set _before_ connecting and
> before "run"? If so, I suggest to use @emph and/or @strong to
> make sure the reader understands you, and maybe rephrase slightly
> to make sure the wording is less ambiguous.
>
> . Since in this context "run" is something the user types, it
> should be @kbd{run}, not @code{run}.
Bad design. This doesn't work:
(gdb) set debug target 1
... do something, get target debug output ...
(gdb) set debug target 0
... do something, no target debug output ...
No technical reason for the behavior (I suspect it is that way 'cos the
target vector is still macros and 'cos people thought that always using
an extra level of indirection would make things slow).
Daniel,
just also file a bug report, and feel free to add some extra verbage to:
add_show_from_set
(add_set_cmd ("target", class_maintenance, var_zinteger,
(char *) &targetdebug,
"Set target debugging.\n\
When non-zero, target debugging is enabled.", &setdebuglist),
&showdebuglist);
Andrew
> Otherwise, it is okay to go in.
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [rfa/target/doc] Print less with "set debug target 1"
2004-03-19 0:09 [rfa/target/doc] Print less with "set debug target 1" Daniel Jacobowitz
2004-03-06 23:08 ` Daniel Jacobowitz
2004-03-08 22:49 ` Michael Snyder
@ 2004-03-09 16:18 ` Daniel Jacobowitz
2004-03-19 0:09 ` Daniel Jacobowitz
2004-03-19 0:09 ` Eli Zaretskii
2004-03-19 0:09 ` Eli Zaretskii
3 siblings, 2 replies; 16+ messages in thread
From: Daniel Jacobowitz @ 2004-03-09 16:18 UTC (permalink / raw)
To: gdb-patches, cagney, eliz
On Sat, Mar 06, 2004 at 06:08:35PM -0500, Daniel Jacobowitz wrote:
> This is something that's always bugged me. I wanted to track a problem in
> the testsuite using "set debug target 1", but the output was so incredibly
> noisy (because of libthread_db) that everything timed out. This patch
> changes "set debug target 1" to only print the first line of a memory
> transfer, and documents "set debug target 2" to print the whole thing.
>
> Seem OK?
Bug report filed - gdb/1583.
Here's what I checked in to HEAD. Eli, I ended up rewording the
description for clarity, and now it says "use the @code{run} command" -
by inspecting the rest of the manual, I'm pretty sure that should stay
@code rather than @kbd. Right?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2004-03-09 Daniel Jacobowitz <drow@mvista.com>
* target.c (debug_to_xfer_memory): If targetdebug is 1, don't
print the whole transfer.
(initialize_targets): Update description of "set debug target".
2004-03-09 Daniel Jacobowitz <drow@mvista.com>
* gdb.texinfo (Debugging Output): Document values for "set debug
target".
Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.70
diff -u -p -r1.70 target.c
--- target.c 19 Jan 2004 16:49:35 -0000 1.70
+++ target.c 9 Mar 2004 16:14:42 -0000
@@ -1829,8 +1829,6 @@ debug_to_xfer_memory (CORE_ADDR memaddr,
(unsigned int) memaddr, /* possable truncate long long */
len, write ? "write" : "read", retval);
-
-
if (retval > 0)
{
int i;
@@ -1839,7 +1837,15 @@ debug_to_xfer_memory (CORE_ADDR memaddr,
for (i = 0; i < retval; i++)
{
if ((((long) &(myaddr[i])) & 0xf) == 0)
- fprintf_unfiltered (gdb_stdlog, "\n");
+ {
+ if (targetdebug < 2 && i > 0)
+ {
+ fprintf_unfiltered (gdb_stdlog, " ...");
+ break;
+ }
+ fprintf_unfiltered (gdb_stdlog, "\n");
+ }
+
fprintf_unfiltered (gdb_stdlog, " %02x", myaddr[i] & 0xff);
}
}
@@ -2431,7 +2437,9 @@ initialize_targets (void)
(add_set_cmd ("target", class_maintenance, var_zinteger,
(char *) &targetdebug,
"Set target debugging.\n\
-When non-zero, target debugging is enabled.", &setdebuglist),
+When non-zero, target debugging is enabled. Higher numbers are more\n\
+verbose. Changes do not take effect until the next \"run\" or \"target\"\n\
+command.", &setdebuglist),
&showdebuglist);
add_setshow_boolean_cmd ("trust-readonly-sections", class_support,
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.199
diff -u -p -r1.199 gdb.texinfo
--- doc/gdb.texinfo 29 Feb 2004 02:57:24 -0000 1.199
+++ doc/gdb.texinfo 9 Mar 2004 16:14:45 -0000
@@ -13434,7 +13434,9 @@ info.
@item set debug target
Turns on or off display of @value{GDBN} target debugging info. This info
includes what is going on at the target level of GDB, as it happens. The
-default is off.
+default is 0. Set it to 1 to track events, and to 2 to also track the
+value of large memory transfers. Changes to this flag do not take effect
+until the next time you connect to a target or use the @code{run} command.
@kindex show debug target
@item show debug target
Displays the current state of displaying @value{GDBN} target debugging
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [rfa/target/doc] Print less with "set debug target 1"
2004-03-19 0:09 ` Eli Zaretskii
@ 2004-03-09 19:39 ` Daniel Jacobowitz
2004-03-19 0:09 ` Daniel Jacobowitz
2004-03-09 19:39 ` Eli Zaretskii
1 sibling, 1 reply; 16+ messages in thread
From: Daniel Jacobowitz @ 2004-03-09 19:39 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches, cagney
On Tue, Mar 09, 2004 at 09:37:01PM +0200, Eli Zaretskii wrote:
> > Date: Tue, 9 Mar 2004 11:18:26 -0500
> > From: Daniel Jacobowitz <drow@false.org>
> >
> > Here's what I checked in to HEAD. Eli, I ended up rewording the
> > description for clarity, and now it says "use the @code{run} command" -
> > by inspecting the rest of the manual, I'm pretty sure that should stay
> > @code rather than @kbd. Right?
>
> If you refer to the name of a command, then @code is okay. But if you
> say "type `SOMETHING'", then whatever you want the user to type should
> be in @kbd.
>
> Did I succeed to explain the difference between these two cases?
Yes, I think so. Thanks!
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [rfa/target/doc] Print less with "set debug target 1"
2004-03-19 0:09 ` Eli Zaretskii
2004-03-09 19:39 ` Daniel Jacobowitz
@ 2004-03-09 19:39 ` Eli Zaretskii
1 sibling, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2004-03-09 19:39 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches, cagney
> Date: Tue, 9 Mar 2004 11:18:26 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> Here's what I checked in to HEAD. Eli, I ended up rewording the
> description for clarity, and now it says "use the @code{run} command" -
> by inspecting the rest of the manual, I'm pretty sure that should stay
> @code rather than @kbd. Right?
If you refer to the name of a command, then @code is okay. But if you
say "type `SOMETHING'", then whatever you want the user to type should
be in @kbd.
Did I succeed to explain the difference between these two cases?
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [rfa/target/doc] Print less with "set debug target 1"
2004-03-09 0:12 ` Andrew Cagney
@ 2004-03-19 0:09 ` Andrew Cagney
0 siblings, 0 replies; 16+ messages in thread
From: Andrew Cagney @ 2004-03-19 0:09 UTC (permalink / raw)
To: Eli Zaretskii, Daniel Jacobowitz; +Cc: gdb-patches
>>Date: Sat, 6 Mar 2004 18:08:35 -0500
>>> From: Daniel Jacobowitz <drow@false.org>
>>>
>>> Seem OK?
>
>
> Thanks for the documentation patch, but I have 2 minor comments:
>
>
>>> @item set debug target
>>> Turns on or off display of @value{GDBN} target debugging info. This info
>>> includes what is going on at the target level of GDB, as it happens. The
>>> -default is off.
>>> +default is 0. Set it to 1 to track events, and to 2 to also track the
>>> +value of large memory transfers. This flag must be set before connecting
>>> +to the target or saying @code{run}.
>
>
> . I'm not sure I understand this sentence--do you mean to say that
> _if_ the flag is set, it must be set _before_ connecting and
> before "run"? If so, I suggest to use @emph and/or @strong to
> make sure the reader understands you, and maybe rephrase slightly
> to make sure the wording is less ambiguous.
>
> . Since in this context "run" is something the user types, it
> should be @kbd{run}, not @code{run}.
Bad design. This doesn't work:
(gdb) set debug target 1
... do something, get target debug output ...
(gdb) set debug target 0
... do something, no target debug output ...
No technical reason for the behavior (I suspect it is that way 'cos the
target vector is still macros and 'cos people thought that always using
an extra level of indirection would make things slow).
Daniel,
just also file a bug report, and feel free to add some extra verbage to:
add_show_from_set
(add_set_cmd ("target", class_maintenance, var_zinteger,
(char *) &targetdebug,
"Set target debugging.\n\
When non-zero, target debugging is enabled.", &setdebuglist),
&showdebuglist);
Andrew
> Otherwise, it is okay to go in.
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [rfa/target/doc] Print less with "set debug target 1"
@ 2004-03-19 0:09 Daniel Jacobowitz
2004-03-06 23:08 ` Daniel Jacobowitz
` (3 more replies)
0 siblings, 4 replies; 16+ messages in thread
From: Daniel Jacobowitz @ 2004-03-19 0:09 UTC (permalink / raw)
To: gdb-patches; +Cc: cagney, eliz
This is something that's always bugged me. I wanted to track a problem in
the testsuite using "set debug target 1", but the output was so incredibly
noisy (because of libthread_db) that everything timed out. This patch
changes "set debug target 1" to only print the first line of a memory
transfer, and documents "set debug target 2" to print the whole thing.
Seem OK?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2004-03-06 Daniel Jacobowitz <drow@mvista.com>
* target.c (debug_to_xfer_memory): If targetdebug is 1, don't
print the whole transfer.
2004-03-06 Daniel Jacobowitz <drow@mvista.com>
* gdb.texinfo (Debugging Output): Document values for "set debug
target".
Index: target.c
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gdb/target.c,v
retrieving revision 1.70
diff -u -p -r1.70 target.c
--- target.c 19 Jan 2004 16:49:35 -0000 1.70
+++ target.c 6 Mar 2004 19:47:07 -0000
@@ -1829,8 +1829,6 @@ debug_to_xfer_memory (CORE_ADDR memaddr,
(unsigned int) memaddr, /* possable truncate long long */
len, write ? "write" : "read", retval);
-
-
if (retval > 0)
{
int i;
@@ -1839,7 +1837,15 @@ debug_to_xfer_memory (CORE_ADDR memaddr,
for (i = 0; i < retval; i++)
{
if ((((long) &(myaddr[i])) & 0xf) == 0)
- fprintf_unfiltered (gdb_stdlog, "\n");
+ {
+ if (targetdebug < 2 && i > 0)
+ {
+ fprintf_unfiltered (gdb_stdlog, " ...");
+ break;
+ }
+ fprintf_unfiltered (gdb_stdlog, "\n");
+ }
+
fprintf_unfiltered (gdb_stdlog, " %02x", myaddr[i] & 0xff);
}
}
Index: doc/gdb.texinfo
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.199
diff -u -p -r1.199 gdb.texinfo
--- doc/gdb.texinfo 29 Feb 2004 02:57:24 -0000 1.199
+++ doc/gdb.texinfo 6 Mar 2004 23:04:55 -0000
@@ -13434,7 +13434,9 @@ info.
@item set debug target
Turns on or off display of @value{GDBN} target debugging info. This info
includes what is going on at the target level of GDB, as it happens. The
-default is off.
+default is 0. Set it to 1 to track events, and to 2 to also track the
+value of large memory transfers. This flag must be set before connecting
+to the target or saying @code{run}.
@kindex show debug target
@item show debug target
Displays the current state of displaying @value{GDBN} target debugging
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [rfa/target/doc] Print less with "set debug target 1"
2004-03-19 0:09 [rfa/target/doc] Print less with "set debug target 1" Daniel Jacobowitz
` (2 preceding siblings ...)
2004-03-09 16:18 ` Daniel Jacobowitz
@ 2004-03-19 0:09 ` Eli Zaretskii
2004-03-07 5:39 ` Eli Zaretskii
` (2 more replies)
3 siblings, 3 replies; 16+ messages in thread
From: Eli Zaretskii @ 2004-03-19 0:09 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches, cagney
> Date: Sat, 6 Mar 2004 18:08:35 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> Seem OK?
Thanks for the documentation patch, but I have 2 minor comments:
> @item set debug target
> Turns on or off display of @value{GDBN} target debugging info. This info
> includes what is going on at the target level of GDB, as it happens. The
> -default is off.
> +default is 0. Set it to 1 to track events, and to 2 to also track the
> +value of large memory transfers. This flag must be set before connecting
> +to the target or saying @code{run}.
. I'm not sure I understand this sentence--do you mean to say that
_if_ the flag is set, it must be set _before_ connecting and
before "run"? If so, I suggest to use @emph and/or @strong to
make sure the reader understands you, and maybe rephrase slightly
to make sure the wording is less ambiguous.
. Since in this context "run" is something the user types, it
should be @kbd{run}, not @code{run}.
Otherwise, it is okay to go in.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [rfa/target/doc] Print less with "set debug target 1"
2004-03-09 19:39 ` Daniel Jacobowitz
@ 2004-03-19 0:09 ` Daniel Jacobowitz
0 siblings, 0 replies; 16+ messages in thread
From: Daniel Jacobowitz @ 2004-03-19 0:09 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches, cagney
On Tue, Mar 09, 2004 at 09:37:01PM +0200, Eli Zaretskii wrote:
> > Date: Tue, 9 Mar 2004 11:18:26 -0500
> > From: Daniel Jacobowitz <drow@false.org>
> >
> > Here's what I checked in to HEAD. Eli, I ended up rewording the
> > description for clarity, and now it says "use the @code{run} command" -
> > by inspecting the rest of the manual, I'm pretty sure that should stay
> > @code rather than @kbd. Right?
>
> If you refer to the name of a command, then @code is okay. But if you
> say "type `SOMETHING'", then whatever you want the user to type should
> be in @kbd.
>
> Did I succeed to explain the difference between these two cases?
Yes, I think so. Thanks!
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [rfa/target/doc] Print less with "set debug target 1"
2004-03-09 16:18 ` Daniel Jacobowitz
2004-03-19 0:09 ` Daniel Jacobowitz
@ 2004-03-19 0:09 ` Eli Zaretskii
2004-03-09 19:39 ` Daniel Jacobowitz
2004-03-09 19:39 ` Eli Zaretskii
1 sibling, 2 replies; 16+ messages in thread
From: Eli Zaretskii @ 2004-03-19 0:09 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches, cagney
> Date: Tue, 9 Mar 2004 11:18:26 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> Here's what I checked in to HEAD. Eli, I ended up rewording the
> description for clarity, and now it says "use the @code{run} command" -
> by inspecting the rest of the manual, I'm pretty sure that should stay
> @code rather than @kbd. Right?
If you refer to the name of a command, then @code is okay. But if you
say "type `SOMETHING'", then whatever you want the user to type should
be in @kbd.
Did I succeed to explain the difference between these two cases?
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [rfa/target/doc] Print less with "set debug target 1"
2004-03-08 22:49 ` Michael Snyder
@ 2004-03-19 0:09 ` Michael Snyder
0 siblings, 0 replies; 16+ messages in thread
From: Michael Snyder @ 2004-03-19 0:09 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches, cagney, eliz
Daniel Jacobowitz wrote:
> This is something that's always bugged me. I wanted to track a problem in
> the testsuite using "set debug target 1", but the output was so incredibly
> noisy (because of libthread_db) that everything timed out. This patch
> changes "set debug target 1" to only print the first line of a memory
> transfer, and documents "set debug target 2" to print the whole thing.
>
> Seem OK?
>
I think it's a great idea -- my only concern is with legacy issues.
But I doubt if more than 3 people in the world ever use it, so I'm
in favor.
M
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [rfa/target/doc] Print less with "set debug target 1"
2004-03-09 16:18 ` Daniel Jacobowitz
@ 2004-03-19 0:09 ` Daniel Jacobowitz
2004-03-19 0:09 ` Eli Zaretskii
1 sibling, 0 replies; 16+ messages in thread
From: Daniel Jacobowitz @ 2004-03-19 0:09 UTC (permalink / raw)
To: gdb-patches, cagney, eliz
On Sat, Mar 06, 2004 at 06:08:35PM -0500, Daniel Jacobowitz wrote:
> This is something that's always bugged me. I wanted to track a problem in
> the testsuite using "set debug target 1", but the output was so incredibly
> noisy (because of libthread_db) that everything timed out. This patch
> changes "set debug target 1" to only print the first line of a memory
> transfer, and documents "set debug target 2" to print the whole thing.
>
> Seem OK?
Bug report filed - gdb/1583.
Here's what I checked in to HEAD. Eli, I ended up rewording the
description for clarity, and now it says "use the @code{run} command" -
by inspecting the rest of the manual, I'm pretty sure that should stay
@code rather than @kbd. Right?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2004-03-09 Daniel Jacobowitz <drow@mvista.com>
* target.c (debug_to_xfer_memory): If targetdebug is 1, don't
print the whole transfer.
(initialize_targets): Update description of "set debug target".
2004-03-09 Daniel Jacobowitz <drow@mvista.com>
* gdb.texinfo (Debugging Output): Document values for "set debug
target".
Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.70
diff -u -p -r1.70 target.c
--- target.c 19 Jan 2004 16:49:35 -0000 1.70
+++ target.c 9 Mar 2004 16:14:42 -0000
@@ -1829,8 +1829,6 @@ debug_to_xfer_memory (CORE_ADDR memaddr,
(unsigned int) memaddr, /* possable truncate long long */
len, write ? "write" : "read", retval);
-
-
if (retval > 0)
{
int i;
@@ -1839,7 +1837,15 @@ debug_to_xfer_memory (CORE_ADDR memaddr,
for (i = 0; i < retval; i++)
{
if ((((long) &(myaddr[i])) & 0xf) == 0)
- fprintf_unfiltered (gdb_stdlog, "\n");
+ {
+ if (targetdebug < 2 && i > 0)
+ {
+ fprintf_unfiltered (gdb_stdlog, " ...");
+ break;
+ }
+ fprintf_unfiltered (gdb_stdlog, "\n");
+ }
+
fprintf_unfiltered (gdb_stdlog, " %02x", myaddr[i] & 0xff);
}
}
@@ -2431,7 +2437,9 @@ initialize_targets (void)
(add_set_cmd ("target", class_maintenance, var_zinteger,
(char *) &targetdebug,
"Set target debugging.\n\
-When non-zero, target debugging is enabled.", &setdebuglist),
+When non-zero, target debugging is enabled. Higher numbers are more\n\
+verbose. Changes do not take effect until the next \"run\" or \"target\"\n\
+command.", &setdebuglist),
&showdebuglist);
add_setshow_boolean_cmd ("trust-readonly-sections", class_support,
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.199
diff -u -p -r1.199 gdb.texinfo
--- doc/gdb.texinfo 29 Feb 2004 02:57:24 -0000 1.199
+++ doc/gdb.texinfo 9 Mar 2004 16:14:45 -0000
@@ -13434,7 +13434,9 @@ info.
@item set debug target
Turns on or off display of @value{GDBN} target debugging info. This info
includes what is going on at the target level of GDB, as it happens. The
-default is off.
+default is 0. Set it to 1 to track events, and to 2 to also track the
+value of large memory transfers. Changes to this flag do not take effect
+until the next time you connect to a target or use the @code{run} command.
@kindex show debug target
@item show debug target
Displays the current state of displaying @value{GDBN} target debugging
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [rfa/target/doc] Print less with "set debug target 1"
2004-03-19 0:09 ` Eli Zaretskii
2004-03-07 5:39 ` Eli Zaretskii
2004-03-09 0:12 ` Andrew Cagney
@ 2004-03-19 0:09 ` Michael Snyder
2004-03-08 22:48 ` Michael Snyder
2 siblings, 1 reply; 16+ messages in thread
From: Michael Snyder @ 2004-03-19 0:09 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Daniel Jacobowitz, gdb-patches, cagney
Eli Zaretskii wrote:
>>Date: Sat, 6 Mar 2004 18:08:35 -0500
>>From: Daniel Jacobowitz <drow@false.org>
>>
>>Seem OK?
>
>
> Thanks for the documentation patch, but I have 2 minor comments:
>
>
>> @item set debug target
>> Turns on or off display of @value{GDBN} target debugging info. This info
>> includes what is going on at the target level of GDB, as it happens. The
>>-default is off.
>>+default is 0. Set it to 1 to track events, and to 2 to also track the
>>+value of large memory transfers. This flag must be set before connecting
>>+to the target or saying @code{run}.
>
>
> . I'm not sure I understand this sentence--do you mean to say that
> _if_ the flag is set, it must be set _before_ connecting and
> before "run"?
Yeah, that's correct. "set debug target" must be given
before the target command. If I remember correctly, it
inserts a layer in the target stack.
> If so, I suggest to use @emph and/or @strong to
> make sure the reader understands you, and maybe rephrase slightly
> to make sure the wording is less ambiguous.
>
> . Since in this context "run" is something the user types, it
> should be @kbd{run}, not @code{run}.
>
> Otherwise, it is okay to go in.
>
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2004-03-09 19:39 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-19 0:09 [rfa/target/doc] Print less with "set debug target 1" Daniel Jacobowitz
2004-03-06 23:08 ` Daniel Jacobowitz
2004-03-08 22:49 ` Michael Snyder
2004-03-19 0:09 ` Michael Snyder
2004-03-09 16:18 ` Daniel Jacobowitz
2004-03-19 0:09 ` Daniel Jacobowitz
2004-03-19 0:09 ` Eli Zaretskii
2004-03-09 19:39 ` Daniel Jacobowitz
2004-03-19 0:09 ` Daniel Jacobowitz
2004-03-09 19:39 ` Eli Zaretskii
2004-03-19 0:09 ` Eli Zaretskii
2004-03-07 5:39 ` Eli Zaretskii
2004-03-09 0:12 ` Andrew Cagney
2004-03-19 0:09 ` Andrew Cagney
2004-03-19 0:09 ` Michael Snyder
2004-03-08 22:48 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox