[all-commits] [llvm/llvm-project] 1ccde5: [ELF] --gdb-index: support .debug_loclists
Fangrui Song via All-commits
all-commits at lists.llvm.org
Wed Apr 29 15:05:23 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 1ccde533425a4ba9d379510206ad680ff9702129
https://github.com/llvm/llvm-project/commit/1ccde533425a4ba9d379510206ad680ff9702129
Author: Fangrui Song <maskray at google.com>
Date: 2020-04-29 (Wed, 29 Apr 2020)
Changed paths:
M lld/ELF/DWARF.cpp
M lld/ELF/DWARF.h
A lld/test/ELF/gdb-index-loclists.s
Log Message:
-----------
[ELF] --gdb-index: support .debug_loclists
--gdb-index currently crashes when reading a translation unit with
DWARF v5 .debug_loclists . Call stack:
```
SyntheticSections.cpp GdbIndexSection::create
SyntheticSections.cpp readAddressAreas
DWARFUnit.cpp DWARFUnit::tryExtractDIEsIfNeeded
DWARFListTable.cpp DWARFListTableHeader::extract
...
DWARFDataExtractor.cpp DWARFDataExtractor::getRelocatedValue
lld/ELF/DWARF.cpp LLDDwarfObj<ELFT>::find (sec.sec is nullptr)
...
```
This patch adds support for .debug_loclists to make `DWARFUnit::tryExtractDIEsIfNeeded` happy.
Building --gdb-index does not need .debug_loclists
Reviewed By: dblaikie, grimar
Differential Revision: https://reviews.llvm.org/D79061
More information about the All-commits
mailing list