From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sources.redhat.com
Cc: cagney@gnu.org, eliz@gnu.org
Subject: [rfa/target/doc] Print less with "set debug target 1"
Date: Fri, 19 Mar 2004 00:09:00 -0000 [thread overview]
Message-ID: <20040306230834.GA9343@nevyn.them.org> (raw)
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
WARNING: multiple messages have this Message-ID
From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sources.redhat.com
Cc: cagney@gnu.org, eliz@gnu.org
Subject: [rfa/target/doc] Print less with "set debug target 1"
Date: Sat, 06 Mar 2004 23:08:00 -0000 [thread overview]
Message-ID: <20040306230834.GA9343@nevyn.them.org> (raw)
Message-ID: <20040306230800.9KUtnW4cwoBHfnlQT0bi7SaLEzEohXajjZxj9iw_xvA@z> (raw)
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
next reply other threads:[~2004-03-06 23:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-19 0:09 Daniel Jacobowitz [this message]
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 ` Eli Zaretskii
2004-03-09 19:39 ` Daniel Jacobowitz
2004-03-19 0:09 ` Daniel Jacobowitz
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
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=20040306230834.GA9343@nevyn.them.org \
--to=drow@false.org \
--cc=cagney@gnu.org \
--cc=eliz@gnu.org \
--cc=gdb-patches@sources.redhat.com \
/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