summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2019-11-27 22:48:15 +0100
committerJohannes Altmanninger <aclopte@gmail.com>2019-12-20 09:04:45 +0100
commit92211bf0f15ba46b5eeb88b7ea580ff539dcdd4e (patch)
tree4dc3bc7aca1f445f8c328e5bcbbb228091c3b5d3 /lldb/source/Plugins/SymbolFile
parentbf507d4259c389cc21d44760b8ebf462edd8e5d0 (diff)
downloadbcm5719-llvm-92211bf0f15ba46b5eeb88b7ea580ff539dcdd4e.tar.gz
bcm5719-llvm-92211bf0f15ba46b5eeb88b7ea580ff539dcdd4e.zip
[LLDB] Fix address computation for inline function
Summary: Fixes PR41237 - SIGSEGV on call expression evaluation when debugging clang When linking multiple compilation units that define the same functions, the functions is merged but their debug info is not. This ignores debug info entries for functions in a non-executable sections; those are functions that were definitely dropped by the linker. Reviewers: spyffe, clayborg, jasonmolenda Reviewed By: clayborg Subscribers: labath, aprantl, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71487
Diffstat (limited to 'lldb/source/Plugins/SymbolFile')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 658158d94a2..502d1af668c 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -2282,9 +2282,12 @@ bool SymbolFileDWARF::ResolveFunction(const DWARFDIE &orig_die,
addr = sc.function->GetAddressRange().GetBaseAddress();
}
- if (addr.IsValid()) {
- sc_list.Append(sc);
- return true;
+
+ if (auto section_sp = addr.GetSection()) {
+ if (section_sp->GetPermissions() & ePermissionsExecutable) {
+ sc_list.Append(sc);
+ return true;
+ }
}
}
OpenPOWER on IntegriCloud