diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-11-11 19:28:21 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-11-11 19:28:21 +0000 |
commit | 65a8efe441f466dd044224247ec05b9fe5ea2f26 (patch) | |
tree | e07167534858a9e27b6b8a6909430aea761f1cf6 /llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | |
parent | 316b5b250790d86dcd9206f06c792548a07105f4 (diff) | |
download | bcm5719-llvm-65a8efe441f466dd044224247ec05b9fe5ea2f26.tar.gz bcm5719-llvm-65a8efe441f466dd044224247ec05b9fe5ea2f26.zip |
dwarfdump: First piece of support for DWP dumping
Just a tiny piece of index dumping - the header in this instance.
llvm-svn: 252781
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp index aecd991ff0d..7ece6787d07 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp @@ -12,6 +12,7 @@ #include "llvm/ADT/StringSwitch.h" #include "llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h" #include "llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h" +#include "llvm/DebugInfo/DWARF/DWARFUnitIndex.h" #include "llvm/Support/Compression.h" #include "llvm/Support/Dwarf.h" #include "llvm/Support/Format.h" @@ -155,6 +156,14 @@ void DWARFContext::dump(raw_ostream &OS, DIDumpType DumpType) { } } + if (DumpType == DIDT_All || DumpType == DIDT_CUIndex) { + OS << "\n.debug_cu_index contents:\n"; + DataExtractor CUIndexData(getCUIndexSection(), isLittleEndian(), savedAddressByteSize); + DWARFUnitIndex CUIndex; + CUIndex.parse(CUIndexData); + CUIndex.dump(OS); + } + if (DumpType == DIDT_All || DumpType == DIDT_LineDwo) { OS << "\n.debug_line.dwo contents:\n"; unsigned stmtOffset = 0; @@ -608,6 +617,7 @@ DWARFContextInMemory::DWARFContextInMemory(const object::ObjectFile &Obj, .Case("apple_namespaces", &AppleNamespacesSection.Data) .Case("apple_namespac", &AppleNamespacesSection.Data) .Case("apple_objc", &AppleObjCSection.Data) + .Case("debug_cu_index", &CUIndexSection) // Any more debug info sections go here. .Default(nullptr); if (SectionData) { |