diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-02-13 15:58:51 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-02-13 15:58:51 +0000 |
commit | a8bcc4d878beb806a2318b70a52668972adfd2ec (patch) | |
tree | 788dd2f48fde34dee962a966ebc3d94510e29a47 /contrib/llvm/tools/lldb/source/Core/Module.cpp | |
parent | 43a7fce37a5cb0d69e27740f6dd431ff6451fdcf (diff) | |
parent | a322a4af1fe8b989fe5d1bbc15de8736a26c03ca (diff) |
Notes
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Core/Module.cpp')
-rw-r--r-- | contrib/llvm/tools/lldb/source/Core/Module.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/contrib/llvm/tools/lldb/source/Core/Module.cpp b/contrib/llvm/tools/lldb/source/Core/Module.cpp index 833540e1a309..a29456f5b5a5 100644 --- a/contrib/llvm/tools/lldb/source/Core/Module.cpp +++ b/contrib/llvm/tools/lldb/source/Core/Module.cpp @@ -559,7 +559,18 @@ Module::ResolveSymbolContextForAddress (const Address& so_addr, uint32_t resolve Symtab *symtab = sym_vendor->GetSymtab(); if (symtab && so_addr.IsSectionOffset()) { - sc.symbol = symtab->FindSymbolContainingFileAddress(so_addr.GetFileAddress()); + Symbol *matching_symbol = nullptr; + + symtab->ForEachSymbolContainingFileAddress(so_addr.GetFileAddress(), + [&matching_symbol](Symbol *symbol) -> bool { + if (symbol->GetType() != eSymbolTypeInvalid) + { + matching_symbol = symbol; + return false; // Stop iterating + } + return true; // Keep iterating + }); + sc.symbol = matching_symbol; if (!sc.symbol && resolve_scope & eSymbolContextFunction && !(resolved_flags & eSymbolContextFunction)) { |