diff options
author | Timothy Wall <twall@alum.mit.edu> | 2000-04-18 17:16:59 +0000 |
---|---|---|
committer | Timothy Wall <twall@alum.mit.edu> | 2000-04-18 17:16:59 +0000 |
commit | ea58412531563145414cc6f028046d74f9037a58 (patch) | |
tree | 664ee5255abd0685344c4aad0e2da57a3b5617b5 | |
parent | 784f35f92cdd5533e5c3c4cc977954411a34feb7 (diff) | |
download | gdb-ea58412531563145414cc6f028046d74f9037a58.zip gdb-ea58412531563145414cc6f028046d74f9037a58.tar.gz gdb-ea58412531563145414cc6f028046d74f9037a58.tar.bz2 |
Fix bug disassmbling binary files for non-octet byte targets.
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/objdump.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index b7e2e50..8621445 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2000-04-17 Timothy Wall <twall@cygnus.com> + + * objdump.c (disassemble_data): Set octets per byte *after* + resolving arch/mach for binary files. + 2000-04-14 Michael Sokolov <msokolov@ivan.Harhan.ORG> * arlex.l: Add directives to increase lex buffer size. diff --git a/binutils/objdump.c b/binutils/objdump.c index b86be66..f29106f 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -1572,7 +1572,7 @@ disassemble_data (abfd) struct disassemble_info disasm_info; struct objdump_disasm_info aux; asection *section; - unsigned int opb = bfd_octets_per_byte (abfd); + unsigned int opb; print_files = NULL; prev_functionname = NULL; @@ -1594,7 +1594,6 @@ disassemble_data (abfd) aux.require_sec = false; disasm_info.print_address_func = objdump_print_address; disasm_info.symbol_at_address_func = objdump_symbol_at_address; - disasm_info.octets_per_byte = opb; if (machine != (char *) NULL) { @@ -1625,10 +1624,13 @@ disassemble_data (abfd) return; } + opb = bfd_octets_per_byte (abfd); + disasm_info.flavour = bfd_get_flavour (abfd); disasm_info.arch = bfd_get_arch (abfd); disasm_info.mach = bfd_get_mach (abfd); disasm_info.disassembler_options = disassembler_options; + disasm_info.octets_per_byte = opb; if (bfd_big_endian (abfd)) disasm_info.display_endian = disasm_info.endian = BFD_ENDIAN_BIG; |