summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBModule.cpp')
-rw-r--r--lldb/source/API/SBModule.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp
index f0c916ea048..219870c733c 100644
--- a/lldb/source/API/SBModule.cpp
+++ b/lldb/source/API/SBModule.cpp
@@ -480,6 +480,15 @@ SBModule::FindGlobalVariables (SBTarget &target, const char *name, uint32_t max_
return sb_value_list;
}
+lldb::SBValue
+SBModule::FindFirstGlobalVariable (lldb::SBTarget &target, const char *name)
+{
+ SBValueList sb_value_list(FindGlobalVariables(target, name, 1));
+ if (sb_value_list.IsValid() && sb_value_list.GetSize() > 0)
+ return sb_value_list.GetValueAtIndex(0);
+ return SBValue();
+}
+
lldb::SBType
SBModule::FindFirstType (const char *name_cstr)
{
OpenPOWER on IntegriCloud