[all-commits] [llvm/llvm-project] 68dafe: [lldb] Use CompileUnit::ResolveSymbolContext in Sy...
Kim-Anh via All-commits
all-commits at lists.llvm.org
Mon Mar 22 00:46:09 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 68dafe40a69f799f69eeeb1f658da6e129c6d832
https://github.com/llvm/llvm-project/commit/68dafe40a69f799f69eeeb1f658da6e129c6d832
Author: Kim-Anh Tran <kimanh at google.com>
Date: 2021-03-22 (Mon, 22 Mar 2021)
Changed paths:
M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
M lldb/source/Symbol/CompileUnit.cpp
A lldb/test/Shell/SymbolFile/DWARF/dwarf5-debug_line-file-index.s
Log Message:
-----------
[lldb] Use CompileUnit::ResolveSymbolContext in SymbolFileDWARF
SymbolFileDWARF::ResolveSymbolContext is currently unaware that in DWARF5 the primary file is specified at file index 0. As a result it misses to correctly resolve the symbol context for the primary file when DWARF5 debug data is used and the primary file is only specified at index 0.
This change makes use of CompileUnit::ResolveSymbolContext to resolve the symbol context. The ResolveSymbolContext in CompileUnit has been previously already updated to reflect changes in DWARF5
and contains a more readable version. It can resolve more, but will also do a bit more work than
SymbolFileDWARF::ResolveSymbolContext (getting the Module, and going through SymbolFileDWARF::ResolveSymbolContextForAddress), however, it's mostly directed by $resolve_scope
what will be resolved, and ensures that code is easier to maintain if there's only one path.
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D98619
More information about the All-commits
mailing list