summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeder Andersen2012-06-11 13:43:35 (EDT)
committerEugene Tarassov2012-06-12 12:58:40 (EDT)
commit78b0a118ad0f395c5cf1354427d563758c21fde8 (patch)
treec1aebf281da301d4110170bf3322f57eac3e32a7
parentd713fe422c178c23119b38e3e1f1bde5d4a2410d (diff)
downloadorg.eclipse.tcf.agent-78b0a118ad0f395c5cf1354427d563758c21fde8.zip
org.eclipse.tcf.agent-78b0a118ad0f395c5cf1354427d563758c21fde8.tar.gz
org.eclipse.tcf.agent-78b0a118ad0f395c5cf1354427d563758c21fde8.tar.bz2
Dwarf parser: support relocating .debug_aranges
The .debug_aranges section contains pointers to the beginning of the dwarf tags describing the compilation unit for a given address range, as offsets into the .debug section. The object may also contain rules to relocate these offsets in a .rel[a].debug_aranges section; this fix updates the dwarf parser to apply these relocations as necessary.
-rw-r--r--agent/tcf/services/dwarfcache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/agent/tcf/services/dwarfcache.c b/agent/tcf/services/dwarfcache.c
index b71f325..e8412f5 100644
--- a/agent/tcf/services/dwarfcache.c
+++ b/agent/tcf/services/dwarfcache.c
@@ -818,7 +818,7 @@ static void load_addr_ranges(void) {
dio_SetPos(next);
}
else {
- U8_T offs = dwarf64 ? dio_ReadU8() : (U8_T)dio_ReadU4();
+ U8_T offs = dio_ReadAddressX(NULL, dwarf64 ? 8 : 4);
U1_T addr_size = dio_ReadU1();
U1_T segm_size = dio_ReadU1();
if (segm_size != 0) str_exception(ERR_INV_DWARF, "segment descriptors are not supported");