diff options
author | Richard Henderson <rth@redhat.com> | 2010-09-02 22:35:18 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2010-09-02 22:35:18 +0000 |
commit | b129eb0e566d53a2500d505cbb80e8ad4ad6f981 (patch) | |
tree | 1d33547e73ecddee2f3bb9cd32f41f158a5c9478 /binutils/objdump.c | |
parent | 09fc85f6cf38328f30243107776dde8e3fece450 (diff) | |
download | gdb-b129eb0e566d53a2500d505cbb80e8ad4ad6f981.zip gdb-b129eb0e566d53a2500d505cbb80e8ad4ad6f981.tar.gz gdb-b129eb0e566d53a2500d505cbb80e8ad4ad6f981.tar.bz2 |
* dwarf.c (init_dwarf_regnames_i386, init_dwarf_regnames_x86_64): New.
(init_dwarf_regnames): Use them.
* dwarf.h: Declare them.
* objdump.c (dump_dwarf): Use bfd_get_arch + bfd_get_mach to set up
the regnames, rather than using elf_machine_code.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r-- | binutils/objdump.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c index ca7741d..8e7d24d 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -2349,10 +2349,24 @@ dump_dwarf (bfd *abfd) else abort (); - if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) + switch (bfd_get_arch (abfd)) { - const struct elf_backend_data *bed = get_elf_backend_data (abfd); - init_dwarf_regnames (bed->elf_machine_code); + case bfd_arch_i386: + switch (bfd_get_mach (abfd)) + { + case bfd_mach_x86_64: + case bfd_mach_x86_64_intel_syntax: + init_dwarf_regnames_x86_64 (); + break; + + default: + init_dwarf_regnames_i386 (); + break; + } + break; + + default: + break; } bfd_map_over_sections (abfd, dump_dwarf_section, NULL); |