diff options
author | Tom Tromey <tom@tromey.com> | 2016-06-14 12:46:56 +0100 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-05-16 11:15:25 -0600 |
commit | 921222e2e8e8427c6a609b1ff66265dceb0d07eb (patch) | |
tree | 40ccb1e90d96105b1510c6806f20ff13fd7d9def /gdb/minidebug.c | |
parent | 3acb7083a675fb3077739a2ae41a4a4cd6ef9cc3 (diff) | |
download | gdb-921222e2e8e8427c6a609b1ff66265dceb0d07eb.zip gdb-921222e2e8e8427c6a609b1ff66265dceb0d07eb.tar.gz gdb-921222e2e8e8427c6a609b1ff66265dceb0d07eb.tar.bz2 |
Use a distinguishing name for minidebug objfile
One part of PR cli/19551 is that the mini debug info objfile reuses the
name of the main objfile from which it comes. This can be seen because
gdb claims to be reading symbols from the same file two times, like:
Reading symbols from /bin/gdb...Reading symbols from /bin/gdb...(no debugging symbols found)...done.
I think this would be less confusing if the minidebug objfile were given
a different name. That is what this patch implements. It also arranges
for the minidebug objfile to be marked OBJF_NOT_FILENAME.
After this patch the output looks like:
Reading symbols from /bin/gdb...Reading symbols from .gnu_debugdata for /usr/libexec/gdb...(no debugging symbols found)...done.
Tested by the buildbot.
gdb/ChangeLog
2018-05-16 Tom Tromey <tom@tromey.com>
PR cli/19551:
* symfile-add-flags.h (enum symfile_add_flags)
<SYMFILE_NOT_FILENAME>: New constant.
* symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
objfile name from BFD.
(symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
* minidebug.c (find_separate_debug_file_in_section): Put
".gnu_debugdata" into BFD's file name.
Diffstat (limited to 'gdb/minidebug.c')
-rw-r--r-- | gdb/minidebug.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/minidebug.c b/gdb/minidebug.c index 693c715..e21353d 100644 --- a/gdb/minidebug.c +++ b/gdb/minidebug.c @@ -269,7 +269,10 @@ find_separate_debug_file_in_section (struct objfile *objfile) return NULL; #ifdef HAVE_LIBLZMA - abfd = gdb_bfd_openr_iovec (objfile_name (objfile), gnutarget, lzma_open, + std::string filename = string_printf (_(".gnu_debugdata for %s"), + objfile_name (objfile)); + + abfd = gdb_bfd_openr_iovec (filename.c_str (), gnutarget, lzma_open, section, lzma_pread, lzma_close, lzma_stat); if (abfd == NULL) return NULL; |