Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2018-07-12 14:36:05 -0400
committerEugene Tarassov2018-07-12 14:36:05 -0400
commit1e4e36304513d32e0f83ef5e7261429d6303dc6d (patch)
tree5e87121546eba44a1ea2836a3845e817222f4731
parent24bfe170663fddfb65a2536f8a37cdd468910ca3 (diff)
downloadorg.eclipse.tcf.agent-1e4e36304513d32e0f83ef5e7261429d6303dc6d.tar.gz
org.eclipse.tcf.agent-1e4e36304513d32e0f83ef5e7261429d6303dc6d.tar.xz
org.eclipse.tcf.agent-1e4e36304513d32e0f83ef5e7261429d6303dc6d.zip
Bug 536676 - Unable to see variables within a C++ namespace
-rw-r--r--agent/tcf/services/symbols_elf.c3
-rw-r--r--tests/test-dwarf/tcf/backend/backend.c8
2 files changed, 10 insertions, 1 deletions
diff --git a/agent/tcf/services/symbols_elf.c b/agent/tcf/services/symbols_elf.c
index 25171741..0768877b 100644
--- a/agent/tcf/services/symbols_elf.c
+++ b/agent/tcf/services/symbols_elf.c
@@ -1285,6 +1285,7 @@ static int find_in_object_tree(ObjectInfo * parent, unsigned level,
obj = children;
while (obj != NULL) {
switch (obj->mTag) {
+ case TAG_namespace:
case TAG_compile_unit:
case TAG_partial_unit:
case TAG_module:
@@ -1774,6 +1775,7 @@ static int find_by_addr_in_unit(ObjectInfo * parent, int level, UnitAddress * ad
ObjectInfo * obj = get_dwarf_children(parent);
while (obj != NULL) {
switch (obj->mTag) {
+ case TAG_namespace:
case TAG_compile_unit:
case TAG_partial_unit:
case TAG_module:
@@ -1953,6 +1955,7 @@ static void enumerate_local_vars(ObjectInfo * parent, int level,
ObjectInfo * obj = get_dwarf_children(parent);
while (obj != NULL) {
switch (obj->mTag) {
+ case TAG_namespace:
case TAG_compile_unit:
case TAG_partial_unit:
case TAG_module:
diff --git a/tests/test-dwarf/tcf/backend/backend.c b/tests/test-dwarf/tcf/backend/backend.c
index 20b6a8fd..7dfc34a4 100644
--- a/tests/test-dwarf/tcf/backend/backend.c
+++ b/tests/test-dwarf/tcf/backend/backend.c
@@ -978,6 +978,7 @@ static void loc_var_func(void * args, Symbol * sym) {
}
if (symbol_class == SYM_CLASS_TYPE && errcmp(err, "Wrong object kind") == 0) return;
if (out_of_body && errcmp(err, "Object location is relative to owner") == 0) return;
+ if (obj == NULL && strcmp(name, "__local_cie") == 0) return; /* Diab .debug_frame symbol */
errno = err;
error_sym("get_symbol_value", sym);
}
@@ -1901,7 +1902,12 @@ static void next_region(void) {
}
if (flags & SYM_FLAG_EXTERNAL) {
if (find_symbol_by_name(elf_ctx, STACK_NO_FRAME, 0, func_name, &fnd_sym) < 0) {
- error("find_symbol_by_name");
+ if (get_error_code(errno) == ERR_SYM_NOT_FOUND && func_object != NULL && func_object->mParent->mTag == TAG_namespace) {
+ /* OK - not visible in the global name space */
+ }
+ else {
+ error("find_symbol_by_name");
+ }
}
}
}

Back to the top