From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24749 invoked by alias); 9 Mar 2004 16:18:29 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24733 invoked from network); 9 Mar 2004 16:18:28 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 9 Mar 2004 16:18:28 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1B0jw2-0000WS-WE; Tue, 09 Mar 2004 11:18:26 -0500 Date: Tue, 09 Mar 2004 16:18:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com, cagney@gnu.org, eliz@gnu.org Subject: Re: [rfa/target/doc] Print less with "set debug target 1" Message-ID: <20040309161826.GC27765@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com, cagney@gnu.org, eliz@gnu.org References: <20040306230834.GA9343@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040306230834.GA9343@nevyn.them.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-03.o/txt/msg00200.txt 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 * 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 * 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24749 invoked by alias); 9 Mar 2004 16:18:29 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24733 invoked from network); 9 Mar 2004 16:18:28 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 9 Mar 2004 16:18:28 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1B0jw2-0000WS-WE; Tue, 09 Mar 2004 11:18:26 -0500 Date: Fri, 19 Mar 2004 00:09:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com, cagney@gnu.org, eliz@gnu.org Subject: Re: [rfa/target/doc] Print less with "set debug target 1" Message-ID: <20040309161826.GC27765@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com, cagney@gnu.org, eliz@gnu.org References: <20040306230834.GA9343@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040306230834.GA9343@nevyn.them.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-03/txt/msg00200.txt.bz2 Message-ID: <20040319000900.zHw6ibMAl3xF1jzoUfCTQQ24__oEz68VwIS2opuMiwg@z> 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 * 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 * 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