[DWARF] - Emit the correct value for DW_AT_addr_base.
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 20 Sep 2018 09:17:36 +0000 (09:17 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 20 Sep 2018 09:17:36 +0000 (09:17 +0000)
commit425f75172f0306d319f644565c607777e1839c28
tree400a8e1037a70078c8a7350c58b6304ab5170f40
parent26ba928214273cba2d1fb951bd395e6fa74896bb
[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
llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp
llvm/lib/CodeGen/AsmPrinter/AddressPool.h
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
llvm/test/DebugInfo/PowerPC/tls-fission.ll
llvm/test/DebugInfo/X86/debug_addr.ll
llvm/test/DebugInfo/X86/tls.ll