diff options
author | Alan Modra <amodra@gmail.com> | 2002-06-27 11:51:42 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-06-27 11:51:42 +0000 |
commit | 91a4d5692a308100eef2865c679adbc1600f9649 (patch) | |
tree | bab5216bd149baca7f902b52a315be0211bffc98 /bfd/dwarf2.c | |
parent | feee612b24c47ca30fa6efc2e31ca28ff0887ce9 (diff) | |
download | gdb-91a4d5692a308100eef2865c679adbc1600f9649.zip gdb-91a4d5692a308100eef2865c679adbc1600f9649.tar.gz gdb-91a4d5692a308100eef2865c679adbc1600f9649.tar.bz2 |
2002-06-27 Kevin Buettner <kevinb@redhat.com>
* dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
DWARF2 formats.
Diffstat (limited to 'bfd/dwarf2.c')
-rw-r--r-- | bfd/dwarf2.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index 008582e..005a21f 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -981,24 +981,20 @@ decode_line_info (unit, stash) line_ptr = stash->dwarf_line_buffer + unit->line_offset; /* Read in the prologue. */ - if (unit->addr_size == 4) - { - lh.total_length = read_4_bytes (abfd, line_ptr); - line_ptr += 4; - offset_size = 4; - } - else + lh.total_length = read_4_bytes (abfd, line_ptr); + line_ptr += 4; + offset_size = 4; + if (lh.total_length == 0xffffffff) { - 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) + else if (lh.total_length == 0 && unit->addr_size == 8) { - lh.total_length = read_8_bytes (abfd, line_ptr); - line_ptr += 8; + /* Handle (non-standard) 64-bit DWARF2 formats. */ + lh.total_length = read_4_bytes (abfd, line_ptr); + line_ptr += 4; offset_size = 8; } line_end = line_ptr + lh.total_length; |