diff options
author | Tom de Vries <tdevries@suse.de> | 2020-03-06 12:51:59 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2020-03-06 12:51:59 +0100 |
commit | fd760e798eb8c325f0d7bab7ddcb74f64dc4c113 (patch) | |
tree | aa979ba71bbef476f4a4abf6c7e25e1f917f4979 | |
parent | 20ea4a609c44e5795a57c7b409e99442f8a44a0d (diff) | |
download | gdb-fd760e798eb8c325f0d7bab7ddcb74f64dc4c113.zip gdb-fd760e798eb8c325f0d7bab7ddcb74f64dc4c113.tar.gz gdb-fd760e798eb8c325f0d7bab7ddcb74f64dc4c113.tar.bz2 |
[gdb] Remove trailing "done" after "Reading symbols from" message
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.
gdb/ChangeLog:
2020-03-06 Tom de Vries <tdevries@suse.de>
* psymtab.c (psymtab_to_symtab): Don't print "done.".
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/psymtab.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b3a5e0a..6596744 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-03-06 Tom de Vries <tdevries@suse.de> + + * psymtab.c (psymtab_to_symtab): Don't print "done.". + 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com> * .dir-locals.el: Add a comment referencing the other copies of diff --git a/gdb/psymtab.c b/gdb/psymtab.c index 69176db..93b7c77 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 (); |