aboutsummaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-10-21 02:18:58 +0000
committerAlan Modra <amodra@gmail.com>2002-10-21 02:18:58 +0000
commit8ab56b6f54e474d5dc034f89b3f6fc7b90b40ed6 (patch)
treeb24e16533eb956e2a3a9d36bb6090e683c059852 /binutils/objdump.c
parent5fe39caef5ecbd0f21eee87f406cfb44a159c65e (diff)
downloadgdb-8ab56b6f54e474d5dc034f89b3f6fc7b90b40ed6.zip
gdb-8ab56b6f54e474d5dc034f89b3f6fc7b90b40ed6.tar.gz
gdb-8ab56b6f54e474d5dc034f89b3f6fc7b90b40ed6.tar.bz2
* objdump.c (dump_data): Correct addr_offset for opb != 1.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 29b5081..73abc98 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -2237,7 +2237,7 @@ dump_data (abfd)
stop_offset = bfd_section_size (abfd, section) / opb;
}
for (addr_offset = start_offset;
- addr_offset < stop_offset; addr_offset += onaline)
+ addr_offset < stop_offset; addr_offset += onaline / opb)
{
bfd_size_type j;
@@ -2255,7 +2255,8 @@ dump_data (abfd)
}
printf (" ");
- for (j = addr_offset; j < addr_offset * opb + onaline; j++)
+ for (j = addr_offset * opb;
+ j < addr_offset * opb + onaline; j++)
{
if (j >= stop_offset * opb)
printf (" ");