summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDidier Brachet2012-08-24 10:38:54 (EDT)
committer Eugene Tarassov2012-08-24 13:05:29 (EDT)
commite8950e7e2225dcd931e51ae46975d011e350b47a (patch)
tree666c2019c25556cb78f9b38656b2cce26057c0bf
parenta3efd5aa8c0bab091e2e18e8a543055695dbb43c (diff)
downloadorg.eclipse.tcf.agent-e8950e7e2225dcd931e51ae46975d011e350b47a.zip
org.eclipse.tcf.agent-e8950e7e2225dcd931e51ae46975d011e350b47a.tar.gz
org.eclipse.tcf.agent-e8950e7e2225dcd931e51ae46975d011e350b47a.tar.bz2
Bug 387816 - Better handle functions of size 0 (labels).
-rw-r--r--agent/tcf/services/symbols_elf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/agent/tcf/services/symbols_elf.c b/agent/tcf/services/symbols_elf.c
index dd554b0..b07eb2f 100644
--- a/agent/tcf/services/symbols_elf.c
+++ b/agent/tcf/services/symbols_elf.c
@@ -1113,7 +1113,10 @@ static int find_by_addr_in_sym_tables(ContextAddress addr, Symbol ** res) {
ContextAddress sym_addr = (ContextAddress)sym_info.value;
if (file->type == ET_REL) sym_addr += (ContextAddress)section->addr;
assert(sym_addr <= lt_addr);
- if (sym_addr + sym_info.size > lt_addr) {
+ /* Check if the searched address is part of symbol address range
+ * or if symbol is a label (function + size of 0). */
+ if (sym_addr + sym_info.size > lt_addr ||
+ (sym_class == SYM_CLASS_FUNCTION && sym_info.size == 0)) {
Symbol * sym = alloc_symbol();
sym->frame = STACK_NO_FRAME;
sym->ctx = context_get_group(sym_ctx, CONTEXT_GROUP_SYMBOLS);