[PATCH] D151906: [BOLT][DWARF] Fix new debug re-writer
Alexander Yermolovich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 1 10:30:30 PDT 2023
ayermolo created this revision.
Herald added subscribers: treapster, mstorsjo, hoy, modimo, wenlei, arphaman, mgrang.
Herald added a reviewer: alexander-shaposhnikov.
Herald added a reviewer: rafauler.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a project: All.
ayermolo requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, jplehr, yota9, sstefan1.
Herald added a project: LLVM.
- Some cleanup and minor fixes for the new debug information re-writer before moving on
to productatization.
- The new rewriter wasn't handling binary with DWARF5 and DWARF4 with
-fdebug-types-sections.
- Removed dead cross cu reference code.
- Added support for DW_AT_sibling.
- With the new re-writer abbrev number can change which can lead to offset of Type
Units changing. Before we would just copy raw data. Changed to write out Type
Unit List. This is generated by gdb-add-index.
- Fixed how bolt handles gdb-index generated by gdb-11 with types sections.
Simplified logic that handles variations of gdb-index.
- Clang can generate two type units with the same hash, but different content. LLD
does not de-duplicate when ThinLTO is involved. Changed so that TU hash and
offset are used to make TU's unique.
- It is possible to have references within location expression to another DIE.
Fixed it so that relative offset is updated correctly.
- Removed all the code related to patching.
- Removed dead code. Changed how we handling writting out TUs and TU Index. It now
should fully work for DWARF4 and DWARF5.
- Removed unused arguments from some APIs, changed return type to void, and other
small cleanups.
Depends on D130315 <https://reviews.llvm.org/D130315>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151906
Files:
bolt/include/bolt/Core/DIEBuilder.h
bolt/include/bolt/Core/DebugData.h
bolt/include/bolt/Rewrite/DIEBuilder.h
bolt/include/bolt/Rewrite/DWARFRewriter.h
bolt/lib/Core/CMakeLists.txt
bolt/lib/Core/DIEBuilder.cpp
bolt/lib/Core/DebugData.cpp
bolt/lib/Rewrite/CMakeLists.txt
bolt/lib/Rewrite/DIEBuilder.cpp
bolt/lib/Rewrite/DWARFRewriter.cpp
bolt/test/X86/Inputs/dwarf4-duplicate-types-helper.s
bolt/test/X86/Inputs/dwarf4-duplicate-types-main.s
bolt/test/X86/Inputs/dwarf4-gdb-index-types-helper.s
bolt/test/X86/Inputs/dwarf4-gdb-index-types-main.s
bolt/test/X86/Inputs/dwarf4-gdb-index-types-v8.gdb-index
bolt/test/X86/Inputs/dwarf4-split-gdb-index-types-helper.s
bolt/test/X86/Inputs/dwarf4-split-gdb-index-types-main.s
bolt/test/X86/Inputs/dwarf4-split-gdb-index-types-v8.gdb-index
bolt/test/X86/Inputs/dwarf4-types-dwarf5-helper.s
bolt/test/X86/Inputs/dwarf4-types-dwarf5-main.s
bolt/test/X86/Inputs/dwarf4-types-dwarf5-types-helper.s
bolt/test/X86/Inputs/dwarf4-types-dwarf5-types-main.s
bolt/test/X86/Inputs/dwarf4-types-helper.s
bolt/test/X86/Inputs/dwarf4-types-helper2.s
bolt/test/X86/Inputs/dwarf4-types-main.s
bolt/test/X86/Inputs/dwarf5-dwarf4-gdb-index-types-v8.generted-gdb11.gdb-index
bolt/test/X86/Inputs/dwarf5-dwarf4-gdb-index-types-v8.generted-gdb9.gdb-index
bolt/test/X86/Inputs/dwarf5-dwarf4-types-backward-forward-cross-reference-helper.s
bolt/test/X86/Inputs/dwarf5-dwarf4-types-backward-forward-cross-reference-main.s
bolt/test/X86/Inputs/dwarf5-gdb-index-types-helper.s
bolt/test/X86/Inputs/dwarf5-gdb-index-types-main.s
bolt/test/X86/Inputs/dwarf5-gdb-index-types-v8.generted-gdb11.gdb-index
bolt/test/X86/Inputs/dwarf5-gdb-index-types-v8.generted-gdb9.gdb-index
bolt/test/X86/Inputs/dwarf5-locexpr-referrence-helper.s
bolt/test/X86/Inputs/dwarf5-locexpr-referrence-main.s
bolt/test/X86/Inputs/dwarf5-split-gdb-index-types-helper.s
bolt/test/X86/Inputs/dwarf5-split-gdb-index-types-main.s
bolt/test/X86/Inputs/dwarf5-split-gdb-index-types-v8.gdb-index
bolt/test/X86/Inputs/dwarf5-types-helper2.s
bolt/test/X86/dwarf4-duplicate-types.test
bolt/test/X86/dwarf4-ftypes-dwo-mono-input-dwp-output.test
bolt/test/X86/dwarf4-gdb-index-types-gdb-generated.test
bolt/test/X86/dwarf4-gdb-index-types-lld-generated.test
bolt/test/X86/dwarf4-sibling.s
bolt/test/X86/dwarf4-split-gdb-index-types-gdb-generated.test
bolt/test/X86/dwarf4-types-dwarf5-types.test
bolt/test/X86/dwarf4-types-dwarf5.test
bolt/test/X86/dwarf4-types-forward-backward-cross-reference.s
bolt/test/X86/dwarf4-types.test
bolt/test/X86/dwarf5-dwarf4-gdb-index-types-gdb-generated-gdb11.test
bolt/test/X86/dwarf5-dwarf4-gdb-index-types-gdb-generated-gdb9.test
bolt/test/X86/dwarf5-dwarf4-gdb-index-types-lld-generated.test
bolt/test/X86/dwarf5-dwarf4-types-backward-forward-cross-reference.test
bolt/test/X86/dwarf5-ftypes-dwo-mono-input-dwp-output.test
bolt/test/X86/dwarf5-gdb-index-types-gdb-generated-gdb11.test
bolt/test/X86/dwarf5-gdb-index-types-gdb-generated-gdb9.test
bolt/test/X86/dwarf5-gdb-index-types-lld-generated.test
bolt/test/X86/dwarf5-locexpr-referrence.test
bolt/test/X86/dwarf5-split-gdb-index-types-gdb-generated.test
bolt/test/X86/dwarf5-types-backward-cross-reference.s
bolt/test/X86/dwarf5-types-forward-cross-reference.s
More information about the llvm-commits
mailing list