summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ModuleList.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-07-07 01:59:51 +0000
committerGreg Clayton <gclayton@apple.com>2011-07-07 01:59:51 +0000
commit644247c1dc56106a06afbf8ac25fa4e07f46dd88 (patch)
treef318a596a16b71724e40d6ae52564b263b5baa10 /lldb/source/Core/ModuleList.cpp
parenta3c122db7e4883129bb35558becd6fe8c4722295 (diff)
downloadbcm5719-llvm-644247c1dc56106a06afbf8ac25fa4e07f46dd88.tar.gz
bcm5719-llvm-644247c1dc56106a06afbf8ac25fa4e07f46dd88.zip
Added "target variable" command that allows introspection of global
variables prior to running your binary. Zero filled sections now get section data correctly filled with zeroes when Target::ReadMemory reads from the object file section data. Added new option groups and option values for file lists. I still need to hook up all of the options to "target variable" to allow more complete introspection by file and shlib. Added the ability for ValueObjectVariable objects to be created with only the target as the execution context. This allows them to be read from the object files through Target::ReadMemory(...). Added a "virtual Module * GetModule()" function to the ValueObject class. By default it will look to the parent variable object and return its module. The module is needed when we have global variables that have file addresses (virtual addresses that are specific to module object files) and in turn allows global variables to be displayed prior to running. Removed all of the unused proxy object support that bit rotted in lldb_private::Value. Replaced a lot of places that used "FileSpec::Compare (lhs, rhs) == 0" code with the more efficient "FileSpec::Equal (lhs, rhs)". Improved logging in GDB remote plug-in. llvm-svn: 134579
Diffstat (limited to 'lldb/source/Core/ModuleList.cpp')
-rw-r--r--lldb/source/Core/ModuleList.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp
index 18f3bbf5bc7..49ec7c96191 100644
--- a/lldb/source/Core/ModuleList.cpp
+++ b/lldb/source/Core/ModuleList.cpp
@@ -150,7 +150,7 @@ ModuleList::GetModuleAtIndex(uint32_t idx)
return module_sp;
}
-size_t
+uint32_t
ModuleList::FindFunctions (const ConstString &name,
uint32_t name_type_mask,
bool include_symbols,
@@ -171,6 +171,24 @@ ModuleList::FindFunctions (const ConstString &name,
}
uint32_t
+ModuleList::FindCompileUnits (const FileSpec &path,
+ bool append,
+ SymbolContextList &sc_list)
+{
+ if (!append)
+ sc_list.Clear();
+
+ Mutex::Locker locker(m_modules_mutex);
+ collection::const_iterator pos, end = m_modules.end();
+ for (pos = m_modules.begin(); pos != end; ++pos)
+ {
+ (*pos)->FindCompileUnits (path, true, sc_list);
+ }
+
+ return sc_list.GetSize();
+}
+
+uint32_t
ModuleList::FindGlobalVariables (const ConstString &name,
bool append,
uint32_t max_matches,
OpenPOWER on IntegriCloud