aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2008-01-28 15:15:32 +0000
committerH.J. Lu <hjl.tools@gmail.com>2008-01-28 15:15:32 +0000
commit2dc4cec1f343cc27605be560098badd0e90137a4 (patch)
treeffc5eaef8784b25c9077b3b1c79b602c8198943e /binutils/readelf.c
parent6e73d59506332fd0325445070952950f24b366a9 (diff)
downloadgdb-2dc4cec1f343cc27605be560098badd0e90137a4.zip
gdb-2dc4cec1f343cc27605be560098badd0e90137a4.tar.gz
gdb-2dc4cec1f343cc27605be560098badd0e90137a4.tar.bz2
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/readelf.c')
-rw-r--r--binutils/readelf.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 20a7681..55ab842 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -624,7 +624,7 @@ find_section (const char *name)
/* Guess the relocation size commonly used by the specific machines. */
static int
-guess_is_rela (unsigned long e_machine)
+guess_is_rela (unsigned int e_machine)
{
switch (e_machine)
{
@@ -3032,22 +3032,18 @@ parse_args (int argc, char **argv)
switch (optarg[index++])
{
case 'i':
- case 'I':
do_debug_info = 1;
break;
case 'a':
- case 'A':
do_debug_abbrevs = 1;
break;
case 'l':
- case 'L':
do_debug_lines = 1;
break;
case 'p':
- case 'P':
do_debug_pubnames = 1;
break;
@@ -3066,17 +3062,14 @@ parse_args (int argc, char **argv)
break;
case 'm':
- case 'M':
do_debug_macinfo = 1;
break;
case 's':
- case 'S':
do_debug_str = 1;
break;
case 'o':
- case 'O':
do_debug_loc = 1;
break;
@@ -3246,6 +3239,8 @@ process_file_header (void)
return 0;
}
+ init_dwarf_regnames (elf_header.e_machine);
+
if (do_header)
{
int i;