|
From: <sv...@va...> - 2013-04-19 15:20:27
|
petarj 2013-04-19 16:23:44 +0100 (Fri, 19 Apr 2013)
New Revision: 13373
Log:
Calculate offsets in read_dwarf2_lineblock based on is64
Reading header length and values in external line info was incorrect at
some places as it used offsets based on dw64 that came from .debug_info.
Instead, offsets should be calculated based on is64 from .debug_line.
This issue surfaced in MIPS64 port, and it was discussed at:
https://bugs.kde.org/show_bug.cgi?id=313267#c20
Modified files:
trunk/coregrind/m_debuginfo/readdwarf.c
Modified: trunk/coregrind/m_debuginfo/readdwarf.c (+3 -3)
===================================================================
--- trunk/coregrind/m_debuginfo/readdwarf.c 2013-04-18 12:52:19 +01:00 (rev 13372)
+++ trunk/coregrind/m_debuginfo/readdwarf.c 2013-04-19 16:23:44 +01:00 (rev 13373)
@@ -527,9 +527,9 @@
goto out;
}
- info.li_header_length = ui->dw64 ? ML_(read_ULong)(external)
- : (ULong)(ML_(read_UInt)(external));
- external += ui->dw64 ? 8 : 4;
+ info.li_header_length = is64 ? ML_(read_ULong)(external)
+ : (ULong)(ML_(read_UInt)(external));
+ external += is64 ? 8 : 4;
if (di->ddump_line)
VG_(printf)(" Prologue Length: %llu\n",
info.li_header_length);
|