* maint.c (print_bfd_section_info): Print the section index.

* symmisc.c (dump_msymbols): Print the section index.
This commit is contained in:
Tom Tromey 2013-04-08 20:20:46 +00:00
parent e27d198cc4
commit 8625fc1bba
3 changed files with 15 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2013-04-08 Tom Tromey <tromey@redhat.com>
* maint.c (print_bfd_section_info): Print the section index.
* symmisc.c (dump_msymbols): Print the section index.
2013-04-08 Tom Tromey <tromey@redhat.com>
PR symtab/8424:

View file

@ -329,6 +329,7 @@ print_bfd_section_info (bfd *abfd,
addr = bfd_section_vma (abfd, asect);
endaddr = addr + bfd_section_size (abfd, asect);
printf_filtered (" [%d] ", gdb_bfd_section_index (abfd, asect));
maint_print_section_info (name, flags, addr, endaddr,
asect->filepos, addr_size);
}

View file

@ -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));