Fix off-by-one errors in *scanf format strings.
[deliverable/binutils-gdb.git] / gdb / maint.c
index 63dd25dc972ae5390f16b7d895c48de74927e191..71c4b85c7e20e266970852d2150bc697fa474457 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);
     }
@@ -502,8 +503,8 @@ maintenance_translate_address (char *arg, int from_tty)
          gdb_assert (sect->the_bfd_section && sect->the_bfd_section->name);
          section_name = sect->the_bfd_section->name;
 
-         gdb_assert (sect->objfile && sect->objfile->name);
-         obj_name = sect->objfile->name;
+         gdb_assert (sect->objfile && objfile_name (sect->objfile));
+         obj_name = objfile_name (sect->objfile);
 
          if (MULTI_OBJFILE_P ())
            printf_filtered (_("%s + %s in section %s of %s\n"),
This page took 0.024848 seconds and 4 git commands to generate.