* maint.c (print_bfd_section_info): Print the section index.
authorTom Tromey <tromey@redhat.com>
Mon, 8 Apr 2013 20:20:46 +0000 (20:20 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 8 Apr 2013 20:20:46 +0000 (20:20 +0000)
* symmisc.c (dump_msymbols): Print the section index.

gdb/ChangeLog
gdb/maint.c
gdb/symmisc.c

index de9ae9022e5b898da3cb36a5f4fb80e79597b95a..f29661fdab9339b5c9c9a2ac826b51372a80bdec 100644 (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:
index 63dd25dc972ae5390f16b7d895c48de74927e191..18a804a955a9f0b98083668292f7ad135b4ed876 100644 (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);
     }
index 4156fc64de3a38e68590fde2b11974c90a20f823..c4bf97e37c7c01df8043273f7bb6f33eab9a616f 100644 (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));
This page took 0.027377 seconds and 4 git commands to generate.