summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBTarget.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-12-04 02:22:16 +0000
committerGreg Clayton <gclayton@apple.com>2012-12-04 02:22:16 +0000
commite14e19253df64b750ced6da0948418f6c80da6c9 (patch)
tree1b41fd23856f63691ed4ec09cca23977dda7d446 /lldb/source/API/SBTarget.cpp
parent15a2860b09c55e2531b1e70b69d7dc56a05060e9 (diff)
downloadbcm5719-llvm-e14e19253df64b750ced6da0948418f6c80da6c9.tar.gz
bcm5719-llvm-e14e19253df64b750ced6da0948418f6c80da6c9.zip
<rdar://problem/12750060>
Add the ability to get a symbol or symbols by name and type from a SBModule, and also the ability to get all symbols by name and type from SBTarget objects. llvm-svn: 169205
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r--lldb/source/API/SBTarget.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 611da77073c..d519ffb7bb1 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -2355,3 +2355,24 @@ SBTarget::ClearModuleLoadAddress (lldb::SBModule module)
}
+lldb::SBSymbolContextList
+SBTarget::FindSymbols (const char *name, lldb::SymbolType symbol_type)
+{
+ SBSymbolContextList sb_sc_list;
+ if (name && name[0])
+ {
+ TargetSP target_sp(GetSP());
+ if (target_sp)
+ {
+ bool append = true;
+ target_sp->GetImages().FindSymbolsWithNameAndType (ConstString(name),
+ symbol_type,
+ *sb_sc_list,
+ append);
+ }
+ }
+ return sb_sc_list;
+
+}
+
+
OpenPOWER on IntegriCloud