aboutsummaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
authorTimothy Wall <twall@alum.mit.edu>2000-04-18 17:16:59 +0000
committerTimothy Wall <twall@alum.mit.edu>2000-04-18 17:16:59 +0000
commitea58412531563145414cc6f028046d74f9037a58 (patch)
tree664ee5255abd0685344c4aad0e2da57a3b5617b5 /binutils/objdump.c
parent784f35f92cdd5533e5c3c4cc977954411a34feb7 (diff)
downloadgdb-ea58412531563145414cc6f028046d74f9037a58.zip
gdb-ea58412531563145414cc6f028046d74f9037a58.tar.gz
gdb-ea58412531563145414cc6f028046d74f9037a58.tar.bz2
Fix bug disassmbling binary files for non-octet byte targets.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c6
1 files changed, 4 insertions, 2 deletions
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;