* i387-tdep.c (i387_fill_fsave, i387_fill_fxsave): Remove.
[deliverable/binutils-gdb.git] / binutils / objdump.c
index 824cc3336b96417bc730bee7072a98fbde1a0258..63480afce14e45fcd2e9f3a2278271375d992686 100644 (file)
@@ -1,6 +1,6 @@
 /* objdump.c -- dump information about an object file.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
    Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
    disassembling is done by the libopcodes library, via a function pointer
    supplied by the disassembler() function.  */
 
+#include "sysdep.h"
 #include "bfd.h"
-#include "bfdver.h"
 #include "progress.h"
 #include "bucomm.h"
 #include "dwarf.h"
-#include "budemang.h"
 #include "getopt.h"
 #include "safe-ctype.h"
 #include "dis-asm.h"
@@ -225,7 +224,7 @@ usage (FILE *stream, int status)
 
       disassembler_usage (stream);
     }
-  if (status == 0)
+  if (REPORT_BUGS_TO[0] && status == 0)
     fprintf (stream, _("Report bugs to %s.\n"), REPORT_BUGS_TO);
   exit (status);
 }
@@ -650,8 +649,9 @@ objdump_print_symname (bfd *abfd, struct disassemble_info *info,
   if (do_demangle && name[0] != '\0')
     {
       /* Demangle the name.  */
-      alloc = demangle (abfd, name);
-      name = alloc;
+      alloc = bfd_demangle (abfd, name, DMGL_ANSI | DMGL_PARAMS);
+      if (alloc != NULL)
+       name = alloc;
     }
 
   if (info != NULL)
@@ -1748,11 +1748,13 @@ disassemble_section (bfd *abfd, asection *section, void *info)
 
          pinfo->symbols = sorted_syms + place;
          pinfo->num_symbols = x - place;
+         pinfo->symtab_pos = place;
        }
       else
        {
          pinfo->symbols = NULL;
          pinfo->num_symbols = 0;
+         pinfo->symtab_pos = -1;
        }
 
       if (! prefix_addresses)
@@ -1945,6 +1947,8 @@ disassemble_data (bfd *abfd)
                 compare_relocs);
        }
     }
+  disasm_info.symtab = sorted_syms;
+  disasm_info.symtab_size = sorted_symcount;
 
   bfd_map_over_sections (abfd, disassemble_section, & disasm_info);
 
@@ -2015,7 +2019,7 @@ dump_dwarf_section (bfd *abfd, asection *section,
   const char *match;
   enum dwarf_section_display_enum i;
 
-  if (strncmp (name, ".gnu.linkonce.wi.", 17) == 0)
+  if (CONST_STRNEQ (name, ".gnu.linkonce.wi."))
     match = ".debug_info";
   else
     match = name;
@@ -2511,12 +2515,16 @@ dump_symbols (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean dynamic)
              /* If we want to demangle the name, we demangle it
                 here, and temporarily clobber it while calling
                 bfd_print_symbol.  FIXME: This is a gross hack.  */
-             alloc = demangle (cur_bfd, name);
-             (*current)->name = alloc;
+             alloc = bfd_demangle (cur_bfd, name, DMGL_ANSI | DMGL_PARAMS);
+             if (alloc != NULL)
+               (*current)->name = alloc;
              bfd_print_symbol (cur_bfd, stdout, *current,
                                bfd_print_symbol_all);
-             (*current)->name = name;
-             free (alloc);
+             if (alloc != NULL)
+               {
+                 (*current)->name = name;
+                 free (alloc);
+               }
            }
          else
            bfd_print_symbol (cur_bfd, stdout, *current,
@@ -2822,8 +2830,9 @@ dump_bfd (bfd *abfd)
       dhandle = read_debugging_info (abfd, syms, symcount);
       if (dhandle != NULL)
        {
-         if (! print_debugging_info (stdout, dhandle, abfd, syms, demangle,
-             dump_debugging_tags ? TRUE : FALSE))
+         if (!print_debugging_info (stdout, dhandle, abfd, syms,
+                                    bfd_demangle,
+                                    dump_debugging_tags ? TRUE : FALSE))
            {
              non_fatal (_("%s: printing debugging information failed"),
                         bfd_get_filename (abfd));
This page took 0.024874 seconds and 4 git commands to generate.