[all-commits] [llvm/llvm-project] 8d0c3d: Emit the CodeView `S_ARMSWITCHTABLE` debug symbol ...
Daniel Paoliello via All-commits
all-commits at lists.llvm.org
Fri Aug 25 10:19:43 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8d0c3db388143f4e058b5f513a70fd5d089d51c3
https://github.com/llvm/llvm-project/commit/8d0c3db388143f4e058b5f513a70fd5d089d51c3
Author: Daniel Paoliello <danpao at microsoft.com>
Date: 2023-08-25 (Fri, 25 Aug 2023)
Changed paths:
M llvm/include/llvm/CodeGen/AsmPrinter.h
M llvm/include/llvm/CodeGen/ISDOpcodes.h
M llvm/include/llvm/CodeGen/MachineInstr.h
M llvm/include/llvm/CodeGen/SelectionDAG.h
M llvm/include/llvm/CodeGen/SelectionDAGISel.h
M llvm/include/llvm/CodeGen/TargetLowering.h
M llvm/include/llvm/DebugInfo/CodeView/CodeView.h
M llvm/include/llvm/DebugInfo/CodeView/CodeViewSymbols.def
M llvm/include/llvm/DebugInfo/CodeView/EnumTables.h
M llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h
M llvm/include/llvm/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.h
M llvm/include/llvm/Support/TargetOpcodes.def
M llvm/include/llvm/Target/Target.td
M llvm/include/llvm/Target/TargetSelectionDAG.td
M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
M llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
M llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
M llvm/lib/CodeGen/MachineCSE.cpp
M llvm/lib/CodeGen/MachineInstr.cpp
M llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
M llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
M llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
M llvm/lib/DebugInfo/CodeView/EnumTables.cpp
M llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp
M llvm/lib/DebugInfo/CodeView/SymbolRecordMapping.cpp
M llvm/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp
M llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp
M llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
M llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
M llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
M llvm/lib/Target/ARM/ARMAsmPrinter.cpp
M llvm/lib/Target/ARM/ARMAsmPrinter.h
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/lib/Target/X86/X86ISelLowering.h
M llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt-constrain.mir
M llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt.mir
A llvm/test/DebugInfo/COFF/jump-table.ll
M llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
Log Message:
-----------
Emit the CodeView `S_ARMSWITCHTABLE` debug symbol for jump tables
The CodeView `S_ARMSWITCHTABLE` debug symbol is used to describe the layout of a jump table, it contains the following information:
* The address of the branch instruction that uses the jump table.
* The address of the jump table.
* The "base" address that the values in the jump table are relative to.
* The type of each entry (absolute pointer, a relative integer, a relative integer that is shifted).
Together this information can be used by debuggers and binary analysis tools to understand what an jump table indirect branch is doing and where it might jump to.
Documentation for the symbol can be found in the Microsoft PDB library dumper: https://github.com/microsoft/microsoft-pdb/blob/0fe89a942f9a0f8e061213313e438884f4c9b876/cvdump/dumpsym7.cpp#L5518
This change adds support to LLVM to emit the `S_ARMSWITCHTABLE` debug symbol as well as to dump it out (for testing purposes).
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D149367
More information about the All-commits
mailing list