[all-commits] [llvm/llvm-project] ce0013: Allow lldb to load .dwp files with large .debug_in...
Greg Clayton via All-commits
all-commits at lists.llvm.org
Wed Nov 29 11:20:05 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ce00133e5f5b243b320d55f7e000057a3f8ad2c9
https://github.com/llvm/llvm-project/commit/ce00133e5f5b243b320d55f7e000057a3f8ad2c9
Author: Greg Clayton <gclayton at fb.com>
Date: 2023-11-29 (Wed, 29 Nov 2023)
Changed paths:
M lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
M lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
Log Message:
-----------
Allow lldb to load .dwp files with large .debug_info or .debug_types. (#73736)
A previous patch to llvm allowed the DWARFUnitIndex class to handle
.debug_info.dwo and .debug_types.dwo sections to go over 4GB by checking
for this case and fixing up the DWARFUnitIndex. LLDB's DWARF parser
tries to use the llvm's DWARF parser when it can, and LLDB's DWARF
parser uses the llvm::DWARFUnitIndex which should allow us to load large
.dwp files, but there were a few things missing on the LLDB front:
- support for parsing DWARFUnit objects when the offset exceeds 4GB due
to a 32 bit truncation issue
- not populating the required DWARF sections when we call
DWARFContext::GetAsLLVM() which didn't allow the fixups to happen as the
data was missing.
This patch fixes these issues and now allows LLDB to parse large .dwp
files without issues. The issue was discovered when running the "target
modules dump separate-debug-info" command on one of these binaries that
used a large .dwp file.
This is unfortunately hard to test without creating a huge .dwp file, so
there are currently no tests for this that I can think of adding that
wouldn't cause disk space constraints or making testing times longer by
producing a huge .dwp file.
More information about the All-commits
mailing list