diff options
author | Eugene Tarassov | 2011-10-13 20:17:20 +0000 |
---|---|---|
committer | Eugene Tarassov | 2011-10-13 20:17:20 +0000 |
commit | 6186ad22443a0240db3920a2f8a38e95be3d7e2a (patch) | |
tree | e8165d15e202dc16b4a3ae3f9ad26554d3d3de2c | |
parent | 94085d30b136b4f4f96f0a929da5d21a061bd20a (diff) | |
download | org.eclipse.tcf.agent-6186ad22443a0240db3920a2f8a38e95be3d7e2a.tar.gz org.eclipse.tcf.agent-6186ad22443a0240db3920a2f8a38e95be3d7e2a.tar.xz org.eclipse.tcf.agent-6186ad22443a0240db3920a2f8a38e95be3d7e2a.zip |
TCF Agent: added support for relocatable unit offset field in .debug_pubnames section.
-rw-r--r-- | services/dwarfcache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/dwarfcache.c b/services/dwarfcache.c index aad4b479..0da30798 100644 --- a/services/dwarfcache.c +++ b/services/dwarfcache.c @@ -625,7 +625,9 @@ static void load_pub_names(ELF_Section * debug_info, ELF_Section * pub_names, Pu } next = dio_GetPos() + size; if (dio_ReadU2() == 2) { - U8_T unit_offs = dwarf64 ? dio_ReadU8() : (U8_T)dio_ReadU4(); + ELF_Section * unit_sect = NULL; + U8_T unit_addr = dio_ReadAddressX(&unit_sect, dwarf64 ? 8 : 4); + U8_T unit_offs = unit_sect == NULL ? unit_addr : unit_addr - unit_sect->addr; U8_T unit_size = dwarf64 ? dio_ReadU8() : (U8_T)dio_ReadU4(); if (unit_offs + unit_size > debug_info->size) str_fmt_exception(ERR_INV_DWARF, "Invalid unit size in %s section", pub_names->name); |