summaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2008-01-28 15:15:32 +0000
committerH.J. Lu <hjl@lucon.org>2008-01-28 15:15:32 +0000
commit92403e8279685a5cab0c6f54d518111412d7608e (patch)
tree6d45cc22c6d37405682741fbfdbb4daf1daf4b4b /binutils/objdump.c
parent389f0d72331c9bc0b2c50ae40764e56b22c0bc6c (diff)
downloadbinutils-redhat-92403e8279685a5cab0c6f54d518111412d7608e.tar.gz
binutils/
2008-01-28 H.J. Lu <hongjiu.lu@intel.com> * dwarf.c: Include "elf/common.h". (eh_addr_size): Changed to int. (dwarf_regnames_i386): New. (dwarf_regnames_x86_64): Likewise. (dwarf_regnames): Likewise. (dwarf_regnames_count): Likewise. (init_dwarf_regnames): Likewise. (regname): Likewise. (frame_display_row): Properly support different address size. Call regname to get register name. (display_debug_frames): Call regname to get register name. Display DW_CFA_def_cfa_register as DW_CFA_def_cfa_register instead of DW_CFA_def_cfa_reg. * dwarf.h (init_dwarf_regnames): New. * objdump.c: Include "elf-bfd.h". (dump_dwarf): Call init_dwarf_regnames on ELF input. * readelf.c (guess_is_rela): Change argument to int. (parse_args): Remove the undocumented upper case options for -wX. (process_file_header): Call init_dwarf_regnames if do_dwarf_register is true. gas/testsuite/ 2008-01-28 H.J. Lu <hongjiu.lu@intel.com> * gas/cfi/cfi-alpha-1.d: Replace DW_CFA_def_cfa_reg with DW_CFA_def_cfa_register. * gas/cfi/cfi-alpha-3.d: Likewise. * gas/cfi/cfi-hppa-1.d: Likewise. * gas/cfi/cfi-i386.d: Likewise. * gas/cfi/cfi-m68k.d: Likewise. * gas/cfi/cfi-mips-1.d: Likewise. * gas/cfi/cfi-sh-1.d: Likewise. * gas/cfi/cfi-sparc-1.d: Likewise. * gas/cfi/cfi-sparc64-1.d: Likewise. * gas/cfi/cfi-x86_64.d: Likewise. * gas/cfi/cfi-common-1.d: Updated for i386/x86-64 register names. * gas/cfi/cfi-common-2.d: Likewise. * gas/cfi/cfi-common-5.d: Likewise. * gas/cfi/cfi-i386.d: Likewise. * gas/cfi/cfi-x86_64.d: Likewise. ld/testsuite/ 2008-01-28 H.J. Lu <hongjiu.lu@intel.com> * ld-elf/eh1.d: Replace DW_CFA_def_cfa_reg with DW_CFA_def_cfa_register. Updated for i386/x86-64 register names. * ld-elf/eh2.d: Likewise. * ld-elf/eh3.d: Likewise. * ld-elf/eh4.d: Likewise. * ld-elf/eh5.d: Likewise.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 5a2ea6ddf3..e5ee5d2b33 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -52,6 +52,7 @@
#include "sysdep.h"
#include "bfd.h"
+#include "elf-bfd.h"
#include "progress.h"
#include "bucomm.h"
#include "dwarf.h"
@@ -2186,6 +2187,12 @@ dump_dwarf (bfd *abfd)
check_mach_o_dwarf (abfd);
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+ {
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ init_dwarf_regnames (bed->elf_machine_code);
+ }
+
bfd_map_over_sections (abfd, dump_dwarf_section, NULL);
free_debug_memory ();