OSDN Git Service

Revert r282238 "Revert r282235 "[llvm-dwarfdump] - Teach dwarfdump to dump gdb-index...
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 23 Sep 2016 11:01:53 +0000 (11:01 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 23 Sep 2016 11:01:53 +0000 (11:01 +0000)
commit582d1a13f3eae2a3a759c026f387e99fc227d8a9
tree2b075a66db24322444db70074041bd2e53ad8c84
parent53a7de61aaf08b8d048b149204eaecf79df6e43d
Revert r282238 "Revert r282235 "[llvm-dwarfdump] - Teach dwarfdump to dump gdb-index section.""

Build bot issues (http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/15856/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Adwarfdump-dump-gdbindex.test)
should be fixed in that version. Issue was that MSVS does not support "%zu". Though it works fine on MSCS 2015,
Bot looks running MSVS 2013 that does not like it. MSDN also says that "z" prefix is not supported: https://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx
I had to use PRId64 instead.

Original commit message:

[llvm-dwarfdump] - Teach dwarfdump to dump gdb-index section.

gold linker's --gdb-index option currently is able to create the .gdb_index section that allows GDB to locate and read the .dwo files as it needs them,
this helps reduce the total size of the object files processed by the linker.

More info about that:
https://gcc.gnu.org/wiki/DebugFission
https://sourceware.org/gdb/onlinedocs/gdb/Index-Section-Format.html

Patch teaches dwarfdump tool to dump this section.

Differential revision: https://reviews.llvm.org/D21503

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282239 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/DIContext.h
include/llvm/DebugInfo/DWARF/DWARFContext.h
include/llvm/DebugInfo/DWARF/DWARFGdbIndex.h [new file with mode: 0644]
lib/DebugInfo/DWARF/CMakeLists.txt
lib/DebugInfo/DWARF/DWARFContext.cpp
lib/DebugInfo/DWARF/DWARFGdbIndex.cpp [new file with mode: 0644]
test/DebugInfo/Inputs/dwarfdump-gdbindex-v7.elf-x86-64 [new file with mode: 0644]
test/DebugInfo/dwarfdump-dump-gdbindex.test [new file with mode: 0644]
tools/llvm-dwarfdump/llvm-dwarfdump.cpp