summaryrefslogtreecommitdiff
path: root/bfd/dwarf2.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2002-06-27 11:51:42 +0000
committerAlan Modra <amodra@bigpond.net.au>2002-06-27 11:51:42 +0000
commitd905f4bc6ccf3f6a84bd414134387a7cd6a624a8 (patch)
tree948e88cf5976c980b4d67c8ca7827f68ec2d9fb4 /bfd/dwarf2.c
parent41bc199a5ed7ee4f81990a284926927394f58379 (diff)
downloadgdb-d905f4bc6ccf3f6a84bd414134387a7cd6a624a8.tar.gz
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.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 008582e1ed5..005a21f7d3b 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;