diff options
| author | David Blaikie <dblaikie@gmail.com> | 2015-12-02 06:21:34 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2015-12-02 06:21:34 +0000 |
| commit | b073cb9be2bbd9458035f6ce28b8df78a5399b8a (patch) | |
| tree | 4d99d4ef04bd63995861e9e14f1026e28504bc97 /llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | |
| parent | 12e7b99ed052e5e2104d36c83f343a0dd7864d1d (diff) | |
| download | bcm5719-llvm-b073cb9be2bbd9458035f6ce28b8df78a5399b8a.tar.gz bcm5719-llvm-b073cb9be2bbd9458035f6ce28b8df78a5399b8a.zip | |
[llvm-dwp] Emit a rather fictional debug_cu_index
This is very rudimentary support for debug_cu_index, but it is enough to
allow llvm-dwarfdump to find the offsets for contributions and
correctly dump debug_info.
It will need to actually find the real signature of the unit and build
the real hash table with the right number of buckets, as per the DWP
specification.
It will also need to be expanded to cover the tu_index as well.
llvm-svn: 254489
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp index 2165d353ba0..a4195b75c47 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp @@ -163,20 +163,12 @@ 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; - if (CUIndex.parse(CUIndexData)) - CUIndex.dump(OS); + getCUIndex().dump(OS); } if (DumpType == DIDT_All || DumpType == DIDT_TUIndex) { OS << "\n.debug_tu_index contents:\n"; - DataExtractor TUIndexData(getTUIndexSection(), isLittleEndian(), - savedAddressByteSize); - DWARFUnitIndex TUIndex; - if (TUIndex.parse(TUIndexData)) - TUIndex.dump(OS); + getTUIndex().dump(OS); } if (DumpType == DIDT_All || DumpType == DIDT_LineDwo) { @@ -280,7 +272,7 @@ const DWARFUnitIndex &DWARFContext::getCUIndex() { DataExtractor CUIndexData(getCUIndexSection(), isLittleEndian(), 0); - CUIndex = llvm::make_unique<DWARFUnitIndex>(); + CUIndex = llvm::make_unique<DWARFUnitIndex>(DW_SECT_INFO); CUIndex->parse(CUIndexData); return *CUIndex; } @@ -291,7 +283,7 @@ const DWARFUnitIndex &DWARFContext::getTUIndex() { DataExtractor TUIndexData(getTUIndexSection(), isLittleEndian(), 0); - TUIndex = llvm::make_unique<DWARFUnitIndex>(); + TUIndex = llvm::make_unique<DWARFUnitIndex>(DW_SECT_TYPES); TUIndex->parse(TUIndexData); return *TUIndex; } |

