Message ID | 20200304132133.GA26507@delia |
---|---|
State | New, archived |
Headers |
Received: (qmail 104540 invoked by alias); 4 Mar 2020 13:21:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 104510 invoked by uid 89); 4 Mar 2020 13:21:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:2823, pst X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Mar 2020 13:21:38 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 47525B210 for <gdb-patches@sourceware.org>; Wed, 4 Mar 2020 13:21:36 +0000 (UTC) Date: Wed, 4 Mar 2020 14:21:34 +0100 From: Tom de Vries <tdevries@suse.de> To: gdb-patches@sourceware.org Subject: [PATCH][gdb] Remove trailing "done" after "Reading symbols from" message Message-ID: <20200304132133.GA26507@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes |
Commit Message
Tom de Vries
March 4, 2020, 1:21 p.m. UTC
Hi, Using verbose, we get some detail on symbol loading: ... $ gdb a.out -iex "set verbose on" Reading symbols from a.out... Reading in symbols for /home/vries/hello.c...done. (gdb) ... And using debug symtab-create, much more detail: ... $ gdb a.out -iex "set verbose on" -iex "set debug symtab-create 1" Reading symbols from a.out... Reading minimal symbols of objfile /data/gdb_versions/devel/lto/a.out ... Installing 30 minimal symbols of objfile /data/gdb_versions/devel/lto/a.out. Done reading minimal symbols. Creating one or more psymtabs for objfile /data/gdb_versions/devel/lto/a.out ... Created psymtab 0x35a3de0 for module ../sysdeps/x86_64/start.S. Created psymtab 0x353e4e0 for module init.c. Created psymtab 0x353e560 for module ../sysdeps/x86_64/crti.S. Created psymtab 0x353e5e0 for module /home/vries/hello.c. Created psymtab 0x35bd530 for module elf-init.c. Created psymtab 0x35bd5b0 for module ../sysdeps/x86_64/crtn.S. Reading in symbols for /home/vries/hello.c...Created compunit symtab 0x354bd20 for hello.c. done. (gdb) ... The "Created compunit symtab" message gets inbetween the "Reading in symbols" and the trailing "done.". [ Strictly speaking this is a regression since commit faa17681cc "Make gdb_flush also flush the wrap buffer", but the same problem happens when using -batch before this commit. ] Fix this by removing the trailing "done." altogether, such that we get: ... Created psymtab 0x3590520 for module ../sysdeps/x86_64/crtn.S. Reading in symbols for /home/vries/hello.c... Created compunit symtab 0x359dd20 for hello.c. (gdb) ... [ Alternatively, we could fix this emitting a "Done reading in symbols" line or some such, like is done for minimal symbols. See above. ] [ Note: Removing the trailing "done." for the "Reading symbols from" message was done in commit 3453e7e409 'Clean up "Reading symbols" output'. ] Build and reg-tested on x86_64-linux. OK for trunk? Thanks, - Tom [gdb] Remove trailing "done" after "Reading symbols from" message gdb/ChangeLog: 2020-03-04 Tom de Vries <tdevries@suse.de> * psymtab.c (psymtab_to_symtab): Don't print "done.". --- gdb/psymtab.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
Comments
* Tom de Vries <tdevries@suse.de> [2020-03-04 14:21:34 +0100]: > Hi, > > Using verbose, we get some detail on symbol loading: > ... > $ gdb a.out -iex "set verbose on" > Reading symbols from a.out... > Reading in symbols for /home/vries/hello.c...done. > (gdb) > ... > > And using debug symtab-create, much more detail: > ... > $ gdb a.out -iex "set verbose on" -iex "set debug symtab-create 1" > Reading symbols from a.out... > Reading minimal symbols of objfile /data/gdb_versions/devel/lto/a.out ... > Installing 30 minimal symbols of objfile /data/gdb_versions/devel/lto/a.out. > Done reading minimal symbols. > Creating one or more psymtabs for objfile /data/gdb_versions/devel/lto/a.out ... > Created psymtab 0x35a3de0 for module ../sysdeps/x86_64/start.S. > Created psymtab 0x353e4e0 for module init.c. > Created psymtab 0x353e560 for module ../sysdeps/x86_64/crti.S. > Created psymtab 0x353e5e0 for module /home/vries/hello.c. > Created psymtab 0x35bd530 for module elf-init.c. > Created psymtab 0x35bd5b0 for module ../sysdeps/x86_64/crtn.S. > Reading in symbols for /home/vries/hello.c...Created compunit symtab 0x354bd20 for hello.c. > done. > (gdb) I'm struggling to understand what problem you're trying to solve here. In general, if we switch on any of the 'set debug ...' flags the output from GDB gets confused. These flags aren't intended for general use, and trying to "fix" GDB's output in the face of these flags is going to be a huge task, for I'm not sure what benefit. Other than the output looking a little neater, is there an actual problem solved here? Thanks, Andrew > ... > > The "Created compunit symtab" message gets inbetween the "Reading in symbols" > and the trailing "done.". [ Strictly speaking this is a regression since > commit faa17681cc "Make gdb_flush also flush the wrap buffer", but the > same problem happens when using -batch before this commit. ] > > Fix this by removing the trailing "done." altogether, such that we get: > ... > Created psymtab 0x3590520 for module ../sysdeps/x86_64/crtn.S. > Reading in symbols for /home/vries/hello.c... > Created compunit symtab 0x359dd20 for hello.c. > (gdb) > ... > > [ Alternatively, we could fix this emitting a "Done reading in symbols" line > or some such, like is done for minimal symbols. See above. ] > > [ Note: Removing the trailing "done." for the "Reading symbols from" message > was done in commit 3453e7e409 'Clean up "Reading symbols" output'. ] > > Build and reg-tested on x86_64-linux. > > OK for trunk? > > Thanks, > - Tom > > [gdb] Remove trailing "done" after "Reading symbols from" message > > gdb/ChangeLog: > > 2020-03-04 Tom de Vries <tdevries@suse.de> > > * psymtab.c (psymtab_to_symtab): Don't print "done.". > > --- > gdb/psymtab.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/gdb/psymtab.c b/gdb/psymtab.c > index fd7fc8feff..7d33dea0d4 100644 > --- a/gdb/psymtab.c > +++ b/gdb/psymtab.c > @@ -760,16 +760,12 @@ psymtab_to_symtab (struct objfile *objfile, struct partial_symtab *pst) > > if (info_verbose) > { > - printf_filtered (_("Reading in symbols for %s..."), > + printf_filtered (_("Reading in symbols for %s...\n"), > pst->filename); > gdb_flush (gdb_stdout); > } > > pst->read_symtab (objfile); > - > - /* Finish up the debug error message. */ > - if (info_verbose) > - printf_filtered (_("done.\n")); > } > > return pst->get_compunit_symtab ();
On 04-03-2020 15:07, Andrew Burgess wrote: > * Tom de Vries <tdevries@suse.de> [2020-03-04 14:21:34 +0100]: > >> Hi, >> >> Using verbose, we get some detail on symbol loading: >> ... >> $ gdb a.out -iex "set verbose on" >> Reading symbols from a.out... >> Reading in symbols for /home/vries/hello.c...done. >> (gdb) >> ... >> >> And using debug symtab-create, much more detail: >> ... >> $ gdb a.out -iex "set verbose on" -iex "set debug symtab-create 1" >> Reading symbols from a.out... >> Reading minimal symbols of objfile /data/gdb_versions/devel/lto/a.out ... >> Installing 30 minimal symbols of objfile /data/gdb_versions/devel/lto/a.out. >> Done reading minimal symbols. >> Creating one or more psymtabs for objfile /data/gdb_versions/devel/lto/a.out ... >> Created psymtab 0x35a3de0 for module ../sysdeps/x86_64/start.S. >> Created psymtab 0x353e4e0 for module init.c. >> Created psymtab 0x353e560 for module ../sysdeps/x86_64/crti.S. >> Created psymtab 0x353e5e0 for module /home/vries/hello.c. >> Created psymtab 0x35bd530 for module elf-init.c. >> Created psymtab 0x35bd5b0 for module ../sysdeps/x86_64/crtn.S. >> Reading in symbols for /home/vries/hello.c...Created compunit symtab 0x354bd20 for hello.c. >> done. >> (gdb) > > I'm struggling to understand what problem you're trying to solve > here. In general, if we switch on any of the 'set debug ...' flags > the output from GDB gets confused. These flags aren't intended for > general use, and trying to "fix" GDB's output in the face of these > flags is going to be a huge task, for I'm not sure what benefit. > > Other than the output looking a little neater, is there an actual > problem solved here? This patch is intended to make the output look a little neater. OK for trunk? Thanks, - Tom
* Tom de Vries <tdevries@suse.de> [2020-03-04 15:13:08 +0100]: > On 04-03-2020 15:07, Andrew Burgess wrote: > > * Tom de Vries <tdevries@suse.de> [2020-03-04 14:21:34 +0100]: > > > >> Hi, > >> > >> Using verbose, we get some detail on symbol loading: > >> ... > >> $ gdb a.out -iex "set verbose on" > >> Reading symbols from a.out... > >> Reading in symbols for /home/vries/hello.c...done. > >> (gdb) > >> ... > >> > >> And using debug symtab-create, much more detail: > >> ... > >> $ gdb a.out -iex "set verbose on" -iex "set debug symtab-create 1" > >> Reading symbols from a.out... > >> Reading minimal symbols of objfile /data/gdb_versions/devel/lto/a.out ... > >> Installing 30 minimal symbols of objfile /data/gdb_versions/devel/lto/a.out. > >> Done reading minimal symbols. > >> Creating one or more psymtabs for objfile /data/gdb_versions/devel/lto/a.out ... > >> Created psymtab 0x35a3de0 for module ../sysdeps/x86_64/start.S. > >> Created psymtab 0x353e4e0 for module init.c. > >> Created psymtab 0x353e560 for module ../sysdeps/x86_64/crti.S. > >> Created psymtab 0x353e5e0 for module /home/vries/hello.c. > >> Created psymtab 0x35bd530 for module elf-init.c. > >> Created psymtab 0x35bd5b0 for module ../sysdeps/x86_64/crtn.S. > >> Reading in symbols for /home/vries/hello.c...Created compunit symtab 0x354bd20 for hello.c. > >> done. > >> (gdb) > > > > I'm struggling to understand what problem you're trying to solve > > here. In general, if we switch on any of the 'set debug ...' flags > > the output from GDB gets confused. These flags aren't intended for > > general use, and trying to "fix" GDB's output in the face of these > > flags is going to be a huge task, for I'm not sure what benefit. > > > > Other than the output looking a little neater, is there an actual > > problem solved here? > > This patch is intended to make the output look a little neater. Oh, yeah, sorry, I miss-read the original patch description. I'm fine with this. Thanks, Andrew
On 06-03-2020 12:02, Andrew Burgess wrote: > * Tom de Vries <tdevries@suse.de> [2020-03-04 15:13:08 +0100]: > >> On 04-03-2020 15:07, Andrew Burgess wrote: >>> * Tom de Vries <tdevries@suse.de> [2020-03-04 14:21:34 +0100]: >>> >>>> Hi, >>>> >>>> Using verbose, we get some detail on symbol loading: >>>> ... >>>> $ gdb a.out -iex "set verbose on" >>>> Reading symbols from a.out... >>>> Reading in symbols for /home/vries/hello.c...done. >>>> (gdb) >>>> ... >>>> >>>> And using debug symtab-create, much more detail: >>>> ... >>>> $ gdb a.out -iex "set verbose on" -iex "set debug symtab-create 1" >>>> Reading symbols from a.out... >>>> Reading minimal symbols of objfile /data/gdb_versions/devel/lto/a.out ... >>>> Installing 30 minimal symbols of objfile /data/gdb_versions/devel/lto/a.out. >>>> Done reading minimal symbols. >>>> Creating one or more psymtabs for objfile /data/gdb_versions/devel/lto/a.out ... >>>> Created psymtab 0x35a3de0 for module ../sysdeps/x86_64/start.S. >>>> Created psymtab 0x353e4e0 for module init.c. >>>> Created psymtab 0x353e560 for module ../sysdeps/x86_64/crti.S. >>>> Created psymtab 0x353e5e0 for module /home/vries/hello.c. >>>> Created psymtab 0x35bd530 for module elf-init.c. >>>> Created psymtab 0x35bd5b0 for module ../sysdeps/x86_64/crtn.S. >>>> Reading in symbols for /home/vries/hello.c...Created compunit symtab 0x354bd20 for hello.c. >>>> done. >>>> (gdb) >>> >>> I'm struggling to understand what problem you're trying to solve >>> here. In general, if we switch on any of the 'set debug ...' flags >>> the output from GDB gets confused. These flags aren't intended for >>> general use, and trying to "fix" GDB's output in the face of these >>> flags is going to be a huge task, for I'm not sure what benefit. >>> >>> Other than the output looking a little neater, is there an actual >>> problem solved here? >> >> This patch is intended to make the output look a little neater. > > Oh, yeah, sorry, I miss-read the original patch description. I'm fine > with this. > Np, thanks for the review :) - Tom
diff --git a/gdb/psymtab.c b/gdb/psymtab.c index fd7fc8feff..7d33dea0d4 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -760,16 +760,12 @@ psymtab_to_symtab (struct objfile *objfile, struct partial_symtab *pst) if (info_verbose) { - printf_filtered (_("Reading in symbols for %s..."), + printf_filtered (_("Reading in symbols for %s...\n"), pst->filename); gdb_flush (gdb_stdout); } pst->read_symtab (objfile); - - /* Finish up the debug error message. */ - if (info_verbose) - printf_filtered (_("done.\n")); } return pst->get_compunit_symtab ();