aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2011-10-12 02:08:07 +0000
committerSean Callanan <scallanan@apple.com>2011-10-12 02:08:07 +0000
commit3e80cd9c9e6ae50ff54537551e2fe3ed5319b9b4 (patch)
treed2b57f506499480a91a81792aa955bf373b95122 /source
parent03f64ca626d4dc0488e6acfe7023e4e376b4df30 (diff)
downloadlldb-3e80cd9c9e6ae50ff54537551e2fe3ed5319b9b4.tar.gz
Added ClangNamespaceDecl * parameters to several
core Module functions that the expression parser will soon be using. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141766 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source')
-rw-r--r--source/API/SBModule.cpp8
-rw-r--r--source/Breakpoint/BreakpointResolverName.cpp12
-rw-r--r--source/Commands/CommandObjectMemory.cpp6
-rw-r--r--source/Commands/CommandObjectTarget.cpp5
-rw-r--r--source/Core/AddressResolverName.cpp7
-rw-r--r--source/Core/Disassembler.cpp4
-rw-r--r--source/Core/Module.cpp9
-rw-r--r--source/Core/ModuleList.cpp9
-rw-r--r--source/Core/SourceManager.cpp3
-rw-r--r--source/Expression/ClangExpressionDeclMap.cpp2
-rw-r--r--source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp3
-rw-r--r--source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp4
-rw-r--r--source/Symbol/SymbolContext.cpp6
13 files changed, 49 insertions, 29 deletions
diff --git a/source/API/SBModule.cpp b/source/API/SBModule.cpp
index 790d8ddca..98bb195ca 100644
--- a/source/API/SBModule.cpp
+++ b/source/API/SBModule.cpp
@@ -344,7 +344,8 @@ SBModule::FindFunctions (const char *name,
if (m_opaque_sp)
{
const bool symbols_ok = true;
- return m_opaque_sp->FindFunctions (ConstString(name),
+ return m_opaque_sp->FindFunctions (ConstString(name),
+ NULL,
name_type_mask,
symbols_ok,
append,
@@ -361,7 +362,8 @@ SBModule::FindGlobalVariables (SBTarget &target, const char *name, uint32_t max_
if (m_opaque_sp)
{
VariableList variable_list;
- const uint32_t match_count = m_opaque_sp->FindGlobalVariables (ConstString (name),
+ const uint32_t match_count = m_opaque_sp->FindGlobalVariables (ConstString (name),
+ NULL,
false,
max_matches,
variable_list);
@@ -398,6 +400,7 @@ SBModule::FindFirstType (const char* name_cstr)
num_matches = m_opaque_sp->FindTypes(sc,
name,
+ NULL,
false,
1,
type_list);
@@ -423,6 +426,7 @@ SBModule::FindTypes (const char* type)
num_matches = m_opaque_sp->FindTypes(sc,
name,
+ NULL,
false,
UINT32_MAX,
type_list);
diff --git a/source/Breakpoint/BreakpointResolverName.cpp b/source/Breakpoint/BreakpointResolverName.cpp
index 9df1dd733..7a9593b7c 100644
--- a/source/Breakpoint/BreakpointResolverName.cpp
+++ b/source/Breakpoint/BreakpointResolverName.cpp
@@ -16,6 +16,7 @@
#include "lldb/Breakpoint/BreakpointLocation.h"
#include "lldb/Core/Log.h"
#include "lldb/Core/StreamString.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
#include "lldb/Target/Target.h"
using namespace lldb;
@@ -128,17 +129,18 @@ BreakpointResolverName::SearchCallback
if (context.module_sp)
{
uint32_t num_functions = context.module_sp->FindFunctions (m_func_name,
- m_func_name_type_mask,
- include_symbols,
- append,
- func_list);
+ NULL,
+ m_func_name_type_mask,
+ include_symbols,
+ append,
+ func_list);
// If the search filter specifies a Compilation Unit, then we don't need to bother to look in plain
// symbols, since all the ones from a set compilation unit will have been found above already.
if (num_functions == 0 && !filter_by_cu)
{
if (m_func_name_type_mask & (eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeAuto))
- context.module_sp->FindSymbolsWithNameAndType (m_func_name, eSymbolTypeCode, sym_list);
+ context.module_sp->FindSymbolsWithNameAndType (m_func_name, NULL, eSymbolTypeCode, sym_list);
}
}
break;
diff --git a/source/Commands/CommandObjectMemory.cpp b/source/Commands/CommandObjectMemory.cpp
index 9629c8410..1aa92fdcc 100644
--- a/source/Commands/CommandObjectMemory.cpp
+++ b/source/Commands/CommandObjectMemory.cpp
@@ -25,6 +25,7 @@
#include "lldb/Interpreter/OptionGroupFormat.h"
#include "lldb/Interpreter/OptionGroupOutputFile.h"
#include "lldb/Interpreter/OptionGroupValueObjectDisplay.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/StackFrame.h"
@@ -447,8 +448,9 @@ public:
sc = frame->GetSymbolContext (eSymbolContextModule);
if (sc.module_sp)
{
- sc.module_sp->FindTypes (sc,
- lookup_type_name,
+ sc.module_sp->FindTypes (sc,
+ lookup_type_name,
+ NULL,
append,
1,
type_list);
diff --git a/source/Commands/CommandObjectTarget.cpp b/source/Commands/CommandObjectTarget.cpp
index 2be8e8d95..3c92f8e71 100644
--- a/source/Commands/CommandObjectTarget.cpp
+++ b/source/Commands/CommandObjectTarget.cpp
@@ -1498,7 +1498,8 @@ LookupFunctionInModule (CommandInterpreter &interpreter, Stream &strm, Module *m
else
{
ConstString function_name (name);
- num_matches = module->FindFunctions (function_name,
+ num_matches = module->FindFunctions (function_name,
+ NULL,
eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector,
include_symbols,
append,
@@ -1543,7 +1544,7 @@ LookupTypeInModule (CommandInterpreter &interpreter,
// else
// {
ConstString name(name_cstr);
- num_matches = module->FindTypes(sc, name, true, UINT32_MAX, type_list);
+ num_matches = module->FindTypes(sc, name, NULL, true, UINT32_MAX, type_list);
// }
if (num_matches)
diff --git a/source/Core/AddressResolverName.cpp b/source/Core/AddressResolverName.cpp
index 040a86218..baf62f21a 100644
--- a/source/Core/AddressResolverName.cpp
+++ b/source/Core/AddressResolverName.cpp
@@ -12,6 +12,7 @@
// Project includes
#include "lldb/Core/Log.h"
#include "lldb/Core/StreamString.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
#include "lldb/lldb-private-log.h"
using namespace lldb;
@@ -109,10 +110,12 @@ AddressResolverName::SearchCallback
case AddressResolver::Exact:
if (context.module_sp)
{
- context.module_sp->FindSymbolsWithNameAndType (m_func_name,
+ context.module_sp->FindSymbolsWithNameAndType (m_func_name,
+ NULL,
eSymbolTypeCode,
sym_list);
- context.module_sp->FindFunctions (m_func_name,
+ context.module_sp->FindFunctions (m_func_name,
+ NULL,
eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector,
include_symbols,
append,
diff --git a/source/Core/Disassembler.cpp b/source/Core/Disassembler.cpp
index 4ebe6888e..e219c1648 100644
--- a/source/Core/Disassembler.cpp
+++ b/source/Core/Disassembler.cpp
@@ -24,6 +24,7 @@
#include "lldb/Core/RegularExpression.h"
#include "lldb/Core/Timer.h"
#include "lldb/Interpreter/NamedOptionValue.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Process.h"
@@ -166,7 +167,8 @@ Disassembler::Disassemble
const bool include_symbols = true;
if (module)
{
- module->FindFunctions (name,
+ module->FindFunctions (name,
+ NULL,
eFunctionNameTypeBase |
eFunctionNameTypeFull |
eFunctionNameTypeMethod |
diff --git a/source/Core/Module.cpp b/source/Core/Module.cpp
index e2c921e14..91395488a 100644
--- a/source/Core/Module.cpp
+++ b/source/Core/Module.cpp
@@ -350,7 +350,7 @@ Module::ResolveSymbolContextsForFileSpec (const FileSpec &file_spec, uint32_t li
uint32_t
-Module::FindGlobalVariables(const ConstString &name, bool append, uint32_t max_matches, VariableList& variables)
+Module::FindGlobalVariables(const ConstString &name, const ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, VariableList& variables)
{
SymbolVendor *symbols = GetSymbolVendor ();
if (symbols)
@@ -389,7 +389,8 @@ Module::FindCompileUnits (const FileSpec &path,
}
uint32_t
-Module::FindFunctions (const ConstString &name,
+Module::FindFunctions (const ConstString &name,
+ const ClangNamespaceDecl *namespace_decl,
uint32_t name_type_mask,
bool include_symbols,
bool append,
@@ -509,7 +510,7 @@ StripTypeName(const char* name_cstr)
}
uint32_t
-Module::FindTypes (const SymbolContext& sc, const ConstString &name, bool append, uint32_t max_matches, TypeList& types)
+Module::FindTypes (const SymbolContext& sc, const ConstString &name, const ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, TypeList& types)
{
uint32_t retval = FindTypes_Impl(sc, name, append, max_matches, types);
@@ -686,7 +687,7 @@ Module::SymbolIndicesToSymbolContextList (Symtab *symtab, std::vector<uint32_t>
}
size_t
-Module::FindSymbolsWithNameAndType (const ConstString &name, SymbolType symbol_type, SymbolContextList &sc_list)
+Module::FindSymbolsWithNameAndType (const ConstString &name, const ClangNamespaceDecl *namespace_decl, SymbolType symbol_type, SymbolContextList &sc_list)
{
// No need to protect this call using m_mutex all other method calls are
// already thread safe.
diff --git a/source/Core/ModuleList.cpp b/source/Core/ModuleList.cpp
index 4ee475b05..7c35c9b6e 100644
--- a/source/Core/ModuleList.cpp
+++ b/source/Core/ModuleList.cpp
@@ -16,6 +16,7 @@
#include "lldb/Core/Log.h"
#include "lldb/Core/Module.h"
#include "lldb/Host/Symbols.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/VariableList.h"
@@ -186,7 +187,7 @@ ModuleList::FindFunctions (const ConstString &name,
collection::const_iterator pos, end = m_modules.end();
for (pos = m_modules.begin(); pos != end; ++pos)
{
- (*pos)->FindFunctions (name, name_type_mask, include_symbols, true, sc_list);
+ (*pos)->FindFunctions (name, NULL, name_type_mask, include_symbols, true, sc_list);
}
return sc_list.GetSize();
@@ -221,7 +222,7 @@ ModuleList::FindGlobalVariables (const ConstString &name,
collection::iterator pos, end = m_modules.end();
for (pos = m_modules.begin(); pos != end; ++pos)
{
- (*pos)->FindGlobalVariables (name, append, max_matches, variable_list);
+ (*pos)->FindGlobalVariables (name, NULL, append, max_matches, variable_list);
}
return variable_list.GetSize() - initial_size;
}
@@ -253,7 +254,7 @@ ModuleList::FindSymbolsWithNameAndType (const ConstString &name,
sc_list.Clear();
collection::iterator pos, end = m_modules.end();
for (pos = m_modules.begin(); pos != end; ++pos)
- (*pos)->FindSymbolsWithNameAndType (name, symbol_type, sc_list);
+ (*pos)->FindSymbolsWithNameAndType (name, NULL, symbol_type, sc_list);
return sc_list.GetSize();
}
@@ -423,7 +424,7 @@ ModuleList::FindTypes_Impl (const SymbolContext& sc, const ConstString &name, bo
for (pos = m_modules.begin(); pos != end; ++pos)
{
if (sc.module_sp.get() == NULL || sc.module_sp.get() == (*pos).get())
- total_matches += (*pos)->FindTypes (sc, name, true, max_matches, types);
+ total_matches += (*pos)->FindTypes (sc, name, NULL, true, max_matches, types);
if (total_matches >= max_matches)
break;
diff --git a/source/Core/SourceManager.cpp b/source/Core/SourceManager.cpp
index 743f2d116..482ccbbcd 100644
--- a/source/Core/SourceManager.cpp
+++ b/source/Core/SourceManager.cpp
@@ -16,6 +16,7 @@
#include "lldb/Core/DataBuffer.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Stream.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
#include "lldb/Symbol/SymbolContext.h"
#include "lldb/Target/Target.h"
@@ -244,7 +245,7 @@ SourceManager::GetDefaultFileAndLine (FileSpec &file_spec, uint32_t &line)
ConstString main_name("main");
bool symbols_okay = false; // Force it to be a debug symbol.
bool append = false;
- num_matches = executable_ptr->FindFunctions (main_name, lldb::eFunctionNameTypeBase, symbols_okay, append, sc_list);
+ num_matches = executable_ptr->FindFunctions (main_name, NULL, lldb::eFunctionNameTypeBase, symbols_okay, append, sc_list);
for (uint32_t idx = 0; idx < num_matches; idx++)
{
SymbolContext sc;
diff --git a/source/Expression/ClangExpressionDeclMap.cpp b/source/Expression/ClangExpressionDeclMap.cpp
index 9d6e48fce..1c932b3e8 100644
--- a/source/Expression/ClangExpressionDeclMap.cpp
+++ b/source/Expression/ClangExpressionDeclMap.cpp
@@ -626,7 +626,7 @@ FindCodeSymbolInContext
)
{
if (sym_ctx.module_sp)
- sym_ctx.module_sp->FindSymbolsWithNameAndType(name, eSymbolTypeCode, sc_list);
+ sym_ctx.module_sp->FindSymbolsWithNameAndType(name, NULL, eSymbolTypeCode, sc_list);
if (!sc_list.GetSize())
sym_ctx.target_sp->GetImages().FindSymbolsWithNameAndType(name, eSymbolTypeCode, sc_list);
diff --git a/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 78ca17f9b..5819defb2 100644
--- a/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -22,6 +22,7 @@
#include "lldb/Core/StreamString.h"
#include "lldb/Core/Timer.h"
#include "lldb/Core/UUID.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
#include "lldb/Symbol/ObjectFile.h"
@@ -1695,7 +1696,7 @@ ObjectFileMachO::GetEntryPointAddress ()
SymbolContextList contexts;
SymbolContext context;
- if (!m_module->FindSymbolsWithNameAndType(ConstString ("start"), eSymbolTypeCode, contexts))
+ if (!m_module->FindSymbolsWithNameAndType(ConstString ("start"), NULL, eSymbolTypeCode, contexts))
return m_entry_point_address;
contexts.GetContextAtIndex(0, context);
diff --git a/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp b/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp
index c5f3e40bd..7aa33c39a 100644
--- a/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp
+++ b/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp
@@ -19,6 +19,7 @@
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/RegisterValue.h"
#include "lldb/Core/ValueObjectVariable.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/VariableList.h"
#include "lldb/Target/Process.h"
@@ -131,7 +132,8 @@ OperatingSystemDarwinKernel::GetThreadListValueObject ()
Module *exe_module = m_process->GetTarget().GetExecutableModulePointer();
if (exe_module)
{
- if (exe_module->FindGlobalVariables (g_thread_list_name,
+ if (exe_module->FindGlobalVariables (g_thread_list_name,
+ NULL,
append,
max_matches,
variable_list))
diff --git a/source/Symbol/SymbolContext.cpp b/source/Symbol/SymbolContext.cpp
index f63509217..261b1482c 100644
--- a/source/Symbol/SymbolContext.cpp
+++ b/source/Symbol/SymbolContext.cpp
@@ -479,7 +479,7 @@ SymbolContext::FindFunctionsByName (const ConstString &name,
}
if (module_sp)
- module_sp->FindFunctions (name, name_type_mask, include_symbols, true, sc_list);
+ module_sp->FindFunctions (name, NULL, name_type_mask, include_symbols, true, sc_list);
if (target_sp)
{
@@ -495,7 +495,7 @@ SymbolContext::FindFunctionsByName (const ConstString &name,
{
ModuleSP iter_module_sp = modules.GetModuleAtIndex(i);
if (module_sp != iter_module_sp)
- iter_module_sp->FindFunctions (name, name_type_mask, include_symbols, true, sc_list);
+ iter_module_sp->FindFunctions (name, NULL, name_type_mask, include_symbols, true, sc_list);
}
}
}
@@ -516,7 +516,7 @@ SymbolContext::FindTypeByName (const ConstString &name) const
TypeList types;
- if (module_sp && module_sp->FindTypes (*this, name, false, 1, types))
+ if (module_sp && module_sp->FindTypes (*this, name, NULL, false, 1, types))
return types.GetTypeAtIndex(0);
SymbolContext sc_for_global_search;