diff options
author | Jim Ingham <jingham@apple.com> | 2011-10-07 22:20:35 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-10-07 22:20:35 +0000 |
commit | 881ec8534e424dacdcad6346409104060145bfe2 (patch) | |
tree | 9bfb74d73f6d251b3646bff1910fa45917cb9aa5 | |
parent | 4a6ae0f01a000b796eb5e71f4211c6f8b5699826 (diff) | |
download | bcm5719-llvm-881ec8534e424dacdcad6346409104060145bfe2.tar.gz bcm5719-llvm-881ec8534e424dacdcad6346409104060145bfe2.zip |
When a function calculates its module, make sure it returns the "real" module, not the linked .o file.
llvm-svn: 141424
-rw-r--r-- | lldb/source/Symbol/Function.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/source/Symbol/Function.cpp b/lldb/source/Symbol/Function.cpp index 8ce275852c5..11480f7c086 100644 --- a/lldb/source/Symbol/Function.cpp +++ b/lldb/source/Symbol/Function.cpp @@ -387,6 +387,16 @@ Function::CalculateSymbolContext(SymbolContext* sc) Module * Function::CalculateSymbolContextModule () { + const Section *section = m_range.GetBaseAddress().GetSection(); + if (section) + { + const Section *linked_section = section->GetLinkedSection(); + if (linked_section) + return linked_section->GetModule(); + else + return section->GetModule(); + } + return this->GetCompileUnit()->GetModule(); } |