gdb configure updates
[binutils-gdb.git] / gdb / maint.c
index db3e63dfcf813b5f8d8fbdaeb73d59059205462d..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);
     }
@@ -452,7 +453,7 @@ maintenance_translate_address (char *arg, int from_tty)
   CORE_ADDR address;
   struct obj_section *sect;
   char *p;
-  struct minimal_symbol *sym;
+  struct bound_minimal_symbol sym;
   struct objfile *objfile;
 
   if (arg == NULL || *arg == 0)
@@ -487,13 +488,13 @@ maintenance_translate_address (char *arg, int from_tty)
   else
     sym = lookup_minimal_symbol_by_pc (address);
 
-  if (sym)
+  if (sym.minsym)
     {
-      const char *symbol_name = SYMBOL_PRINT_NAME (sym);
+      const char *symbol_name = SYMBOL_PRINT_NAME (sym.minsym);
       const char *symbol_offset
-       = pulongest (address - SYMBOL_VALUE_ADDRESS (sym));
+       = pulongest (address - SYMBOL_VALUE_ADDRESS (sym.minsym));
 
-      sect = SYMBOL_OBJ_SECTION(sym);
+      sect = SYMBOL_OBJ_SECTION(sym.objfile, sym.minsym);
       if (sect != NULL)
        {
          const char *section_name;
@@ -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"),