Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2012-01-03 20:04:29 +0000
committerEugene Tarassov2012-01-03 20:04:29 +0000
commit9bc4607e5cc58fed2ed22b65a1ad66bcf5eed358 (patch)
tree4d8175d6f21ae310340663ccbe78d867db55f187
parentb34f7cde61e0ab1aa8cd712c5f49c52c18ea07ed (diff)
downloadorg.eclipse.tcf.agent-9bc4607e5cc58fed2ed22b65a1ad66bcf5eed358.tar.gz
org.eclipse.tcf.agent-9bc4607e5cc58fed2ed22b65a1ad66bcf5eed358.tar.xz
org.eclipse.tcf.agent-9bc4607e5cc58fed2ed22b65a1ad66bcf5eed358.zip
TCF Agent: a bit faster implementation of find_in_object_tree().
-rw-r--r--agent/tcf/services/symbols_elf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/agent/tcf/services/symbols_elf.c b/agent/tcf/services/symbols_elf.c
index 3f232e15..ef1054cb 100644
--- a/agent/tcf/services/symbols_elf.c
+++ b/agent/tcf/services/symbols_elf.c
@@ -456,6 +456,11 @@ static int find_in_object_tree(ObjectInfo * parent, ContextAddress rt_offs, Cont
if (obj->mName != NULL && !(obj->mFlags & DOIF_specification)) {
if (strcmp(obj->mName, name) == 0) {
object2symbol(obj, &sym_cur);
+ if (ip == 0) {
+ sym_cur->obj = find_definition(sym_cur->obj);
+ *sym = sym_cur;
+ return 1;
+ }
}
if (parent->mTag == TAG_subprogram) {
if (obj->mID == obj_ptr || (obj_ptr == 0 && obj->mTag == TAG_formal_parameter &&

Back to the top