summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Module.cpp
diff options
context:
space:
mode:
authorMatt Kopec <Matt.Kopec@intel.com>2013-02-27 20:13:38 +0000
committerMatt Kopec <Matt.Kopec@intel.com>2013-02-27 20:13:38 +0000
commit00049b8b969f19908ac09df0e1e1debca4271eef (patch)
tree2137b2c54fd50092ab429d44f4fa5d3c90eee4bf /lldb/source/Core/Module.cpp
parent2e419768938efe2dff0767490791f71976d00e54 (diff)
downloadbcm5719-llvm-00049b8b969f19908ac09df0e1e1debca4271eef.tar.gz
bcm5719-llvm-00049b8b969f19908ac09df0e1e1debca4271eef.zip
Add GNU indirect function support in expressions for Linux.
llvm-svn: 176206
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r--lldb/source/Core/Module.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 953a81bfdbe..2341144132b 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -606,7 +606,7 @@ Module::FindFunctions (const ConstString &name,
if (symtab)
{
std::vector<uint32_t> symbol_indexes;
- symtab->FindAllSymbolsWithNameAndType (name, eSymbolTypeCode, Symtab::eDebugAny, Symtab::eVisibilityAny, symbol_indexes);
+ symtab->FindAllSymbolsWithNameAndType (name, eSymbolTypeAny, Symtab::eDebugAny, Symtab::eVisibilityAny, symbol_indexes);
const size_t num_matches = symbol_indexes.size();
if (num_matches)
{
@@ -615,7 +615,10 @@ Module::FindFunctions (const ConstString &name,
for (size_t i=0; i<num_matches; i++)
{
sc.symbol = symtab->SymbolAtIndex(symbol_indexes[i]);
- sc_list.AppendIfUnique (sc, merge_symbol_into_function);
+ SymbolType sym_type = sc.symbol->GetType();
+ if (sc.symbol && (sym_type == eSymbolTypeCode ||
+ sym_type == eSymbolTypeResolver))
+ sc_list.AppendIfUnique (sc, merge_symbol_into_function);
}
}
}
@@ -649,7 +652,7 @@ Module::FindFunctions (const RegularExpression& regex,
if (symtab)
{
std::vector<uint32_t> symbol_indexes;
- symtab->AppendSymbolIndexesMatchingRegExAndType (regex, eSymbolTypeCode, Symtab::eDebugAny, Symtab::eVisibilityAny, symbol_indexes);
+ symtab->AppendSymbolIndexesMatchingRegExAndType (regex, eSymbolTypeAny, Symtab::eDebugAny, Symtab::eVisibilityAny, symbol_indexes);
const size_t num_matches = symbol_indexes.size();
if (num_matches)
{
@@ -658,7 +661,10 @@ Module::FindFunctions (const RegularExpression& regex,
for (size_t i=0; i<num_matches; i++)
{
sc.symbol = symtab->SymbolAtIndex(symbol_indexes[i]);
- sc_list.AppendIfUnique (sc, merge_symbol_into_function);
+ SymbolType sym_type = sc.symbol->GetType();
+ if (sc.symbol && (sym_type == eSymbolTypeCode ||
+ sym_type == eSymbolTypeResolver))
+ sc_list.AppendIfUnique (sc, merge_symbol_into_function);
}
}
}
OpenPOWER on IntegriCloud