aboutsummaryrefslogtreecommitdiff
path: root/gdb/symmisc.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-04-08 20:20:46 +0000
committerTom Tromey <tromey@redhat.com>2013-04-08 20:20:46 +0000
commit8625fc1bbae9c0c26859f3f6b2111f737d897d15 (patch)
treee20102b8ad827cd3e7503e26cf36fc6b4c024747 /gdb/symmisc.c
parente27d198cc40537237b23d1f34f972d3b2e1c805e (diff)
downloadgdb-8625fc1bbae9c0c26859f3f6b2111f737d897d15.zip
gdb-8625fc1bbae9c0c26859f3f6b2111f737d897d15.tar.gz
gdb-8625fc1bbae9c0c26859f3f6b2111f737d897d15.tar.bz2
* maint.c (print_bfd_section_info): Print the section index.
* symmisc.c (dump_msymbols): Print the section index.
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r--gdb/symmisc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 4156fc6..c4bf97e 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -261,9 +261,15 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile)
outfile);
fprintf_filtered (outfile, " %s", SYMBOL_LINKAGE_NAME (msymbol));
if (section)
- fprintf_filtered (outfile, " section %s",
- bfd_section_name (objfile->obfd,
- section->the_bfd_section));
+ {
+ if (section->the_bfd_section != NULL)
+ fprintf_filtered (outfile, " section %s",
+ bfd_section_name (objfile->obfd,
+ section->the_bfd_section));
+ else
+ fprintf_filtered (outfile, " spurious section %ld",
+ section - objfile->sections);
+ }
if (SYMBOL_DEMANGLED_NAME (msymbol) != NULL)
{
fprintf_filtered (outfile, " %s", SYMBOL_DEMANGLED_NAME (msymbol));