From 644247c1dc56106a06afbf8ac25fa4e07f46dd88 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 7 Jul 2011 01:59:51 +0000 Subject: 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 --- lldb/source/Core/ModuleList.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'lldb/source/Core/ModuleList.cpp') 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, @@ -170,6 +170,24 @@ ModuleList::FindFunctions (const ConstString &name, return sc_list.GetSize(); } +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, -- cgit v1.2.3