frame, backtrace: allow targets to supply a frame unwinder
[deliverable/binutils-gdb.git] / gdb / maint.c
index ee947bd410c6b9d83e2376bd0ff2079231c4df9f..41a39e79e4577e0d65da50d639ce8333c249da06 100644 (file)
@@ -1,6 +1,6 @@
 /* Support for GDB maintenance commands.
 
-   Copyright (C) 1992-2013 Free Software Foundation, Inc.
+   Copyright (C) 1992-2014 Free Software Foundation, Inc.
 
    Written by Fred Fish at Cygnus Support.
 
@@ -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);
     }
@@ -493,7 +494,7 @@ maintenance_translate_address (char *arg, int from_tty)
       const char *symbol_offset
        = pulongest (address - SYMBOL_VALUE_ADDRESS (sym.minsym));
 
-      sect = SYMBOL_OBJ_SECTION(sym.minsym);
+      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"),
@@ -901,7 +902,7 @@ make_command_stats_cleanup (int msg_type)
       && !per_command_symtab)
     return make_cleanup (null_cleanup, 0);
 
-  new_stat = XZALLOC (struct cmd_stats);
+  new_stat = XCNEW (struct cmd_stats);
 
   new_stat->msg_type = msg_type;
 
This page took 0.028025 seconds and 4 git commands to generate.