This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] Tiny 64-bit Dwarf2 glitch
- From: Jason Eckhardt <jle at owlnet dot rice dot edu>
- To: <binutils at sources dot redhat dot com>
- Cc: Jason Lee Eckhardt <jle at owlnet dot rice dot edu>
- Date: Tue, 25 Jun 2002 12:41:56 -0500 (CDT)
- Subject: [PATCH] Tiny 64-bit Dwarf2 glitch
This 64- vs. 32-bit glitch was giving me problems on IRIX64.
Objections?
2002-06-25 Jason Eckhardt <jle@rice.edu>
* dwarf2.c (decode_line_info): Check unit->addr_size
to read in the proper number of prologue bytes.
*** orig.dwarf2.c Tue Jun 25 10:25:02 2002
--- dwarf2.c Tue Jun 25 10:30:50 2002
*************** decode_line_info (unit, stash)
*** 972,986 ****
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 (lh.total_length == 0xffffffff)
{
lh.total_length = read_8_bytes (abfd, line_ptr);
line_ptr += 8;
offset_size = 8;
}
line_end = line_ptr + lh.total_length;
lh.version = read_2_bytes (abfd, line_ptr);
line_ptr += 2;
--- 972,991 ----
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
+ {
+ BFD_ASSERT (unit->addr_size == 8);
lh.total_length = read_8_bytes (abfd, line_ptr);
line_ptr += 8;
offset_size = 8;
}
+
line_end = line_ptr + lh.total_length;
lh.version = read_2_bytes (abfd, line_ptr);
line_ptr += 2;