diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2019-11-27 22:48:15 +0100 |
|---|---|---|
| committer | Johannes Altmanninger <aclopte@gmail.com> | 2019-12-20 09:04:45 +0100 |
| commit | 92211bf0f15ba46b5eeb88b7ea580ff539dcdd4e (patch) | |
| tree | 4dc3bc7aca1f445f8c328e5bcbbb228091c3b5d3 /lldb/source/Plugins/SymbolFile | |
| parent | bf507d4259c389cc21d44760b8ebf462edd8e5d0 (diff) | |
| download | bcm5719-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.cpp | 9 |
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; + } } } |

