diff options
author | George Rimar <grimar@accesssoftek.com> | 2018-09-20 09:17:36 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2018-09-20 09:17:36 +0000 |
commit | 425f75172f0306d319f644565c607777e1839c28 (patch) | |
tree | 400a8e1037a70078c8a7350c58b6304ab5170f40 /llvm/lib/CodeGen/AsmPrinter/AddressPool.h | |
parent | 26ba928214273cba2d1fb951bd395e6fa74896bb (diff) | |
download | bcm5719-llvm-425f75172f0306d319f644565c607777e1839c28.tar.gz bcm5719-llvm-425f75172f0306d319f644565c607777e1839c28.zip |
[DWARF] - Emit the correct value for DW_AT_addr_base.
Currently, we emit DW_AT_addr_base that points to the beginning of
the .debug_addr section. That is not correct for the DWARF5 case because address
table contains the header and the attribute should point to the first entry
following the header.
This is currently the reason why LLDB does not work with such executables correctly.
Patch fixes the issue.
Differential revision: https://reviews.llvm.org/D52168
llvm-svn: 342635
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AddressPool.h')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AddressPool.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AddressPool.h b/llvm/lib/CodeGen/AsmPrinter/AddressPool.h index d5008fab556..2209c7eb50e 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AddressPool.h +++ b/llvm/lib/CodeGen/AsmPrinter/AddressPool.h @@ -51,8 +51,14 @@ public: void resetUsedFlag() { HasBeenUsed = false; } + MCSymbol *getLabel() { return AddressTableBaseSym; } + void setLabel(MCSymbol *Sym) { AddressTableBaseSym = Sym; } + private: void emitHeader(AsmPrinter &Asm, MCSection *Section); + + /// Symbol designates the start of the contribution to the address table. + MCSymbol *AddressTableBaseSym = nullptr; }; } // end namespace llvm |