diff options
author | Nick Clifton <nickc@redhat.com> | 2002-06-25 19:10:00 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2002-06-25 19:10:00 +0000 |
commit | 75326bcc176ad9ad117f9a4181f20b3a13ead007 (patch) | |
tree | 361feab2eabdf3e6c523bace1bd29649ef5f0c20 /bfd/dwarf2.c | |
parent | e55006792a0ba2610c8b9a17de769cce773b2696 (diff) | |
download | binutils-redhat-75326bcc176ad9ad117f9a4181f20b3a13ead007.tar.gz |
Check unit->addr_size to read in the proper number of prologue bytes.
Diffstat (limited to 'bfd/dwarf2.c')
-rw-r--r-- | bfd/dwarf2.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index e3b8e27370..008582e1ed 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -981,9 +981,20 @@ decode_line_info (unit, stash) line_ptr = stash->dwarf_line_buffer + unit->line_offset; /* Read in the prologue. */ - lh.total_length = read_4_bytes (abfd, line_ptr); - line_ptr += 4; - offset_size = 4; + if (unit->addr_size == 4) + { + lh.total_length = read_4_bytes (abfd, line_ptr); + line_ptr += 4; + offset_size = 4; + } + else + { + BFD_ASSERT (unit->addr_size == 8); + lh.total_length = read_8_bytes (abfd, line_ptr); + line_ptr += 8; + offset_size = 8; + } + if (lh.total_length == 0xffffffff) { lh.total_length = read_8_bytes (abfd, line_ptr); |