summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Pouyollon2013-09-27 11:08:52 (EDT)
committer Eugene Tarassov2013-09-27 13:16:30 (EDT)
commit87dc9fbfde29e3c771536dc7c56557e3e4f37807 (patch)
treed41d00b630a9523cbd25ad7f5d921258ea9d6791
parentef3c8821a7f068be38e8b4666e6be808b8ae1872 (diff)
downloadorg.eclipse.tcf.agent-87dc9fbfde29e3c771536dc7c56557e3e4f37807.zip
org.eclipse.tcf.agent-87dc9fbfde29e3c771536dc7c56557e3e4f37807.tar.gz
org.eclipse.tcf.agent-87dc9fbfde29e3c771536dc7c56557e3e4f37807.tar.bz2
Fix debug_arranges
Handle GCC empty entries. Signed-off-by: Xavier Pouyollon <xavier.pouyollon@windriver.com>
-rw-r--r--agent/tcf/services/dwarfcache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/agent/tcf/services/dwarfcache.c b/agent/tcf/services/dwarfcache.c
index 16272b7..9e71e41 100644
--- a/agent/tcf/services/dwarfcache.c
+++ b/agent/tcf/services/dwarfcache.c
@@ -868,7 +868,9 @@ static void load_addr_ranges(void) {
ELF_Section * size_sec = NULL;
ContextAddress addr = (ContextAddress)dio_ReadAddressX(&addr_sec, addr_size);
ContextAddress size = (ContextAddress)dio_ReadAddressX(&size_sec, addr_size);
- if (addr == 0 && size == 0) break;
+ /* GCC 4.1.2 can generate 'empty entries' at the
+ * beginning of the list ! */
+ if (addr == 0 && size == 0 && (dio_GetPos()==next)) break;
if (size == 0) continue;
add_addr_range(addr_sec, sCompUnit, addr, size);
}