summaryrefslogtreecommitdiff
path: root/source/Core/Module.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-02-13 15:01:33 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-02-13 15:01:33 +0000
commit2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (patch)
tree525149683974afa86747b749d45f0425749e972e /source/Core/Module.cpp
parente195173fdf080138dbb42936dea88c605e4b9a56 (diff)
Notes
Diffstat (limited to 'source/Core/Module.cpp')
-rw-r--r--source/Core/Module.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/Core/Module.cpp b/source/Core/Module.cpp
index 833540e1a3099..a29456f5b5a5f 100644
--- a/source/Core/Module.cpp
+++ b/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))
{