llvm-dwarfdump: implement --find for .apple_names
authorAdrian Prantl <aprantl@apple.com>
Thu, 28 Sep 2017 18:10:52 +0000 (18:10 +0000)
committerAdrian Prantl <aprantl@apple.com>
Thu, 28 Sep 2017 18:10:52 +0000 (18:10 +0000)
commit99fdb9d9270c9df61e29a926787c8aa4317187ba
tree03a860b1d8ad7c3f574c66ebead70d9ae18e1e74
parent705db63ce1544c6618a95c4fbf28bc9e994c091a
llvm-dwarfdump: implement --find for .apple_names

This patch implements the dwarfdump option --find=<name>.  This option
looks for a DIE in the accelerator tables and dumps it if found.  This
initial patch only adds support for .apple_names to keep the review
small, adding the other sections and pubnames support should be
trivial though.

Differential Revision: https://reviews.llvm.org/D38282

llvm-svn: 314439
llvm/include/llvm/BinaryFormat/Dwarf.h
llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
llvm/lib/BinaryFormat/Dwarf.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h
llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/test/tools/llvm-dwarfdump/X86/find.test [new file with mode: 0644]
llvm/test/tools/llvm-dwarfdump/cmdline.test
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp