diff --git a/llvm/lib/ObjectYAML/DWARFYAML.cpp b/llvm/lib/ObjectYAML/DWARFYAML.cpp --- a/llvm/lib/ObjectYAML/DWARFYAML.cpp +++ b/llvm/lib/ObjectYAML/DWARFYAML.cpp @@ -17,7 +17,7 @@ namespace llvm { bool DWARFYAML::Data::isEmpty() const { - return DebugStrings.empty() && AbbrevDecls.empty() && DebugAranges && + return DebugStrings.empty() && AbbrevDecls.empty() && !DebugAranges && DebugRanges.empty() && !PubNames && !PubTypes && !GNUPubNames && !GNUPubTypes && CompileUnits.empty() && DebugLines.empty(); } diff --git a/llvm/test/ObjectYAML/MachO/DWARF-pubsections.yaml b/llvm/test/ObjectYAML/MachO/DWARF-pubsections.yaml --- a/llvm/test/ObjectYAML/MachO/DWARF-pubsections.yaml +++ b/llvm/test/ObjectYAML/MachO/DWARF-pubsections.yaml @@ -372,7 +372,6 @@ # EMPTY-NEXT: reserved1: 0x00000000 # EMPTY-NEXT: reserved2: 0x00000000 # EMPTY-NEXT: reserved3: 0x00000000 -# EMPTY-NEXT: content: '' # EMPTY-NEXT: - sectname: __debug_pubtypes # EMPTY-NEXT: segname: __DWARF # EMPTY-NEXT: addr: 0x0000000000000000 @@ -385,7 +384,6 @@ # EMPTY-NEXT: reserved1: 0x00000000 # EMPTY-NEXT: reserved2: 0x00000000 # EMPTY-NEXT: reserved3: 0x00000000 -# EMPTY-NEXT: content: '' # EMPTY-NEXT: ... --- !mach-o diff --git a/llvm/test/tools/obj2yaml/MachO/DWARF-debug_aranges-error.yaml b/llvm/test/tools/obj2yaml/MachO/DWARF-debug_aranges-error.yaml deleted file mode 100644 --- a/llvm/test/tools/obj2yaml/MachO/DWARF-debug_aranges-error.yaml +++ /dev/null @@ -1,300 +0,0 @@ -# RUN: yaml2obj %s | not obj2yaml 2>&1 | FileCheck %s - ---- !mach-o -FileHeader: - magic: 0xFEEDFACF - cputype: 0x01000007 - cpusubtype: 0x00000003 - filetype: 0x0000000A - ncmds: 5 - sizeofcmds: 1800 - flags: 0x00000000 - reserved: 0x00000000 -LoadCommands: - - cmd: LC_SEGMENT_64 - cmdsize: 72 - segname: __PAGEZERO - vmaddr: 0 - vmsize: 4294967296 - fileoff: 0 - filesize: 0 - maxprot: 0 - initprot: 0 - nsects: 0 - flags: 0 - - cmd: LC_SEGMENT_64 - cmdsize: 472 - segname: __TEXT - vmaddr: 4294967296 - vmsize: 4096 - fileoff: 0 - filesize: 0 - maxprot: 7 - initprot: 5 - nsects: 5 - flags: 0 - Sections: - - sectname: __text - segname: __TEXT - addr: 0x0000000100000F50 - size: 52 - offset: 0x00000000 - align: 4 - reloff: 0x00000000 - nreloc: 0 - flags: 0x80000400 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 - - sectname: __stubs - segname: __TEXT - addr: 0x0000000100000F84 - size: 6 - offset: 0x00000000 - align: 1 - reloff: 0x00000000 - nreloc: 0 - flags: 0x80000408 - reserved1: 0x00000000 - reserved2: 0x00000006 - reserved3: 0x00000000 - - sectname: __stub_helper - segname: __TEXT - addr: 0x0000000100000F8C - size: 26 - offset: 0x00000000 - align: 2 - reloff: 0x00000000 - nreloc: 0 - flags: 0x80000400 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 - - sectname: __cstring - segname: __TEXT - addr: 0x0000000100000FA6 - size: 14 - offset: 0x00000000 - align: 0 - reloff: 0x00000000 - nreloc: 0 - flags: 0x00000002 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 - - sectname: __unwind_info - segname: __TEXT - addr: 0x0000000100000FB4 - size: 72 - offset: 0x00000000 - align: 2 - reloff: 0x00000000 - nreloc: 0 - flags: 0x00000000 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 - - cmd: LC_SEGMENT_64 - cmdsize: 232 - segname: __DATA - vmaddr: 4294971392 - vmsize: 4096 - fileoff: 0 - filesize: 0 - maxprot: 7 - initprot: 3 - nsects: 2 - flags: 0 - Sections: - - sectname: __nl_symbol_ptr - segname: __DATA - addr: 0x0000000100001000 - size: 16 - offset: 0x00000000 - align: 3 - reloff: 0x00000000 - nreloc: 0 - flags: 0x00000006 - reserved1: 0x00000001 - reserved2: 0x00000000 - reserved3: 0x00000000 - - sectname: __la_symbol_ptr - segname: __DATA - addr: 0x0000000100001010 - size: 8 - offset: 0x00000000 - align: 3 - reloff: 0x00000000 - nreloc: 0 - flags: 0x00000007 - reserved1: 0x00000003 - reserved2: 0x00000000 - reserved3: 0x00000000 - - cmd: LC_SEGMENT_64 - cmdsize: 72 - segname: __LINKEDIT - vmaddr: 4294975488 - vmsize: 4096 - fileoff: 4096 - filesize: 60 - maxprot: 7 - initprot: 1 - nsects: 0 - flags: 0 - - cmd: LC_SEGMENT_64 - cmdsize: 952 - segname: __DWARF - vmaddr: 4294979584 - vmsize: 4096 - fileoff: 8192 - filesize: 764 - maxprot: 7 - initprot: 3 - nsects: 11 - flags: 0 - Sections: - - sectname: __debug_line - segname: __DWARF - addr: 0x0000000100003000 - size: 69 - offset: 0x00002000 - align: 0 - reloff: 0x00000000 - nreloc: 0 - flags: 0x00000000 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 - - sectname: __debug_pubnames - segname: __DWARF - addr: 0x0000000100003045 - size: 27 - offset: 0x00002045 - align: 0 - reloff: 0x00000000 - nreloc: 0 - flags: 0x00000000 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 - - sectname: __debug_pubtypes - segname: __DWARF - addr: 0x0000000100003060 - size: 35 - offset: 0x00002060 - align: 0 - reloff: 0x00000000 - nreloc: 0 - flags: 0x00000000 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 - - sectname: __debug_aranges - segname: __DWARF - addr: 0x0000000100003083 - size: 48 - offset: 0x00002083 - align: 0 - reloff: 0x00000000 - nreloc: 0 - flags: 0x00000000 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 - - sectname: __debug_info - segname: __DWARF - addr: 0x00000001000030B3 - size: 121 - offset: 0x000020B3 - align: 0 - reloff: 0x00000000 - nreloc: 0 - flags: 0x00000000 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 - - sectname: __debug_abbrev - segname: __DWARF - addr: 0x000000010000312C - size: 76 - offset: 0x0000212C - align: 0 - reloff: 0x00000000 - nreloc: 0 - flags: 0x00000000 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 - - sectname: __debug_str - segname: __DWARF - addr: 0x0000000100003178 - size: 142 - offset: 0x00002178 - align: 0 - reloff: 0x00000000 - nreloc: 0 - flags: 0x00000000 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 - - sectname: __apple_names - segname: __DWARF - addr: 0x0000000100003206 - size: 60 - offset: 0x00002206 - align: 0 - reloff: 0x00000000 - nreloc: 0 - flags: 0x00000000 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 - - sectname: __apple_namespac - segname: __DWARF - addr: 0x0000000100003242 - size: 36 - offset: 0x00002242 - align: 0 - reloff: 0x00000000 - nreloc: 0 - flags: 0x00000000 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 - - sectname: __apple_types - segname: __DWARF - addr: 0x0000000100003266 - size: 114 - offset: 0x00002266 - align: 0 - reloff: 0x00000000 - nreloc: 0 - flags: 0x00000000 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 - - sectname: __apple_objc - segname: __DWARF - addr: 0x00000001000032D8 - size: 36 - offset: 0x000022D8 - align: 0 - reloff: 0x00000000 - nreloc: 0 - flags: 0x00000000 - reserved1: 0x00000000 - reserved2: 0x00000000 - reserved3: 0x00000000 -DWARF: - debug_aranges: - - Length: 45 - Version: 2 - CuOffset: 0 - AddressSize: 8 - SegmentSelectorSize: 0 - Descriptors: - - Address: 0x0000000100000F50 - Length: 52 -... - -#CHECK: the length of address range table at offset 0x0 exceeds section size diff --git a/llvm/test/tools/obj2yaml/MachO/debug-aranges.yaml b/llvm/test/tools/obj2yaml/MachO/debug-aranges.yaml new file mode 100644 --- /dev/null +++ b/llvm/test/tools/obj2yaml/MachO/debug-aranges.yaml @@ -0,0 +1,96 @@ +## a) Test that we are able to dump the __debug_aranges section. +## The content of the __debug_aranges section should be written to +## the "DWARF" entry and the "content" field should remain empty. + +# RUN: yaml2obj --docnum=1 %s | obj2yaml | FileCheck %s --check-prefix=ARANGES + +# ARANGES: Sections: +# ARANGES-NEXT: - sectname: __debug_aranges +# ARANGES-NEXT: segname: __DWARF +# ARANGES-NEXT: addr: 0x0000000000000000 +# ARANGES-NEXT: size: 64 +# ARANGES-NEXT: offset: 0x00000210 +# ARANGES-NEXT: align: 0 +# ARANGES-NEXT: reloff: 0x00000000 +# ARANGES-NEXT: nreloc: 0 +# ARANGES-NEXT: flags: 0x00000000 +# ARANGES-NEXT: reserved1: 0x00000000 +# ARANGES-NEXT: reserved2: 0x00000000 +# ARANGES-NEXT: reserved3: 0x00000000 +# ARANGES-NEXT: DWARF: +# ARANGES-NEXT: debug_aranges: +# ARANGES-NEXT: - Length: 0x000000000000003C +# ARANGES-NEXT: Version: 2 +# ARANGES-NEXT: CuOffset: 0x0000000000001234 +# ARANGES-NEXT: AddressSize: 0x08 +# ARANGES-NEXT: Descriptors: +# ARANGES-NEXT: - Address: 0x0000000000001234 +# ARANGES-NEXT: Length: 0x0000000000005678 +# ARANGES-NEXT: - Address: 0x0000000000001234 +# ARANGES-NEXT: Length: 0x0000000000005678 + +--- !mach-o +FileHeader: + magic: 0xFEEDFACF + cputype: 0x01000007 + cpusubtype: 0x00000003 + filetype: 0x0000000A + ncmds: 1 + sizeofcmds: 232 + flags: 0x00000000 + reserved: 0x00000000 +LoadCommands: + - cmd: LC_SEGMENT_64 + cmdsize: 152 + segname: __DWARF + vmaddr: 0x00 + vmsize: 0x00 + fileoff: 0x00 + filesize: 0x00 + maxprot: 0 + initprot: 0 + nsects: 1 + flags: 0 + Sections: + - sectname: __debug_aranges + segname: __DWARF + addr: 0x00 + size: 64 + offset: 528 + align: 0 + reloff: 0x00000000 + nreloc: 0 + flags: 0x00000000 + reserved1: 0x00000000 + reserved2: 0x00000000 + reserved3: 0x00000000 +DWARF: + debug_aranges: + - Length: [[LENGTH=]] + Version: 2 + CuOffset: 0x1234 + Descriptors: + - Address: 0x1234 + Length: 0x5678 + - Address: 0x1234 + Length: 0x5678 + +## d) Test dumping a __debug_aranges section whose length field doesn't match the actual length. +## This makes the DWARF parser fail to parse it and we will dump it as a raw content section. + +# RUN: yaml2obj --docnum=1 -DLENGTH=0x2 %s | obj2yaml | FileCheck %s --check-prefix=RAW-CONTENT + +# RAW-CONTENT: - sectname: __debug_aranges +# RAW-CONTENT-NEXT: segname: __DWARF +# RAW-CONTENT-NEXT: addr: 0x0000000000000000 +# RAW-CONTENT-NEXT: size: 64 +# RAW-CONTENT-NEXT: offset: 0x00000210 +# RAW-CONTENT-NEXT: align: 0 +# RAW-CONTENT-NEXT: reloff: 0x00000000 +# RAW-CONTENT-NEXT: nreloc: 0 +# RAW-CONTENT-NEXT: flags: 0x00000000 +# RAW-CONTENT-NEXT: reserved1: 0x00000000 +# RAW-CONTENT-NEXT: reserved2: 0x00000000 +# RAW-CONTENT-NEXT: reserved3: 0x00000000 +# RAW-CONTENT-NEXT: content: '02000000020034120000080000000000341200000000000078560000000000003412000000000000785600000000000000000000000000000000000000000000' +# RAW-CONTENT-NEXT: ... diff --git a/llvm/tools/obj2yaml/dwarf2yaml.cpp b/llvm/tools/obj2yaml/dwarf2yaml.cpp --- a/llvm/tools/obj2yaml/dwarf2yaml.cpp +++ b/llvm/tools/obj2yaml/dwarf2yaml.cpp @@ -415,21 +415,3 @@ return Error::success(); } - -llvm::Error dwarf2yaml(DWARFContext &DCtx, DWARFYAML::Data &Y) { - if (Error E = dumpDebugAbbrev(DCtx, Y)) - return E; - if (Error E = dumpDebugStrings(DCtx, Y)) - return E; - if (Error E = dumpDebugARanges(DCtx, Y)) - return E; - if (Error E = dumpDebugRanges(DCtx, Y)) - return E; - if (Error E = dumpDebugPubSections(DCtx, Y)) - return E; - if (Error E = dumpDebugInfo(DCtx, Y)) - return E; - if (Error E = dumpDebugLines(DCtx, Y)) - return E; - return ErrorSuccess(); -} diff --git a/llvm/tools/obj2yaml/macho2yaml.cpp b/llvm/tools/obj2yaml/macho2yaml.cpp --- a/llvm/tools/obj2yaml/macho2yaml.cpp +++ b/llvm/tools/obj2yaml/macho2yaml.cpp @@ -10,7 +10,9 @@ #include "obj2yaml.h" #include "llvm/DebugInfo/DWARF/DWARFContext.h" #include "llvm/Object/MachOUniversal.h" +#include "llvm/ObjectYAML/DWARFYAML.h" #include "llvm/ObjectYAML/ObjectYAML.h" +#include "llvm/Support/Error.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/LEB128.h" @@ -23,9 +25,11 @@ template Expected processLoadCommandData( MachOYAML::LoadCommand &LC, - const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd); + const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd, + std::unique_ptr &Y); const object::MachOObjectFile &Obj; + std::unique_ptr DWARFCtx; void dumpHeader(std::unique_ptr &Y); Error dumpLoadCommands(std::unique_ptr &Y); void dumpLinkEdit(std::unique_ptr &Y); @@ -44,10 +48,13 @@ template Expected extractSections(const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd, - std::vector &Sections); + std::vector &Sections, + std::unique_ptr &Y); public: - MachODumper(const object::MachOObjectFile &O) : Obj(O) {} + MachODumper(const object::MachOObjectFile &O, + std::unique_ptr DCtx) + : Obj(O), DWARFCtx(std::move(DCtx)) {} Expected> dump(); }; @@ -58,7 +65,7 @@ if (Obj.isLittleEndian() != sys::IsLittleEndianHost) \ MachO::swapStruct(LC.Data.LCStruct##_data); \ if (Expected ExpectedEndPtr = \ - processLoadCommandData(LC, LoadCmd)) \ + processLoadCommandData(LC, LoadCmd, Y)) \ EndPtr = *ExpectedEndPtr; \ else \ return ExpectedEndPtr.takeError(); \ @@ -125,10 +132,35 @@ return TempSec; } +static Error dumpDebugSection(StringRef SecName, DWARFContext &DCtx, + DWARFYAML::Data &DWARF) { + Error Err = Error::success(); + cantFail(std::move(Err)); + + if (SecName == "__debug_abbrev") + Err = dumpDebugAbbrev(DCtx, DWARF); + else if (SecName == "__debug_aranges") + Err = dumpDebugARanges(DCtx, DWARF); + else if (SecName == "__debug_info") + Err = dumpDebugInfo(DCtx, DWARF); + else if (SecName == "__debug_line") + Err = dumpDebugLines(DCtx, DWARF); + else if (SecName.startswith("__debug_pub")) + // FIXME: We should extract pub-section dumpers from this function. + Err = dumpDebugPubSections(DCtx, DWARF); + else if (SecName == "__debug_ranges") + Err = dumpDebugRanges(DCtx, DWARF); + else if (SecName == "__debug_str") + Err = dumpDebugStrings(DCtx, DWARF); + + return Err; +} + template Expected MachODumper::extractSections( const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd, - std::vector &Sections) { + std::vector &Sections, + std::unique_ptr &Y) { auto End = LoadCmd.Ptr + LoadCmd.C.cmdsize; const SectionType *Curr = reinterpret_cast(LoadCmd.Ptr + sizeof(SegmentType)); @@ -139,9 +171,19 @@ MachO::swapStruct(Sec); // For MachO section indices start from 1. if (Expected S = - constructSection(Sec, Sections.size() + 1)) + constructSection(Sec, Sections.size() + 1)) { + StringRef SecName(S->sectname); + DWARFYAML::Data DWARF; + if (SecName.startswith("__debug_")) { + // If the DWARF section cannot be successfully parsed, emit raw content + // instead of an entry in the DWARF section of the YAML. + if (Error Err = dumpDebugSection(SecName, *DWARFCtx.get(), Y->DWARF)) + consumeError(std::move(Err)); + else + S->content.reset(); + } Sections.push_back(std::move(*S)); - else + } else return S.takeError(); } return reinterpret_cast(Curr); @@ -150,7 +192,8 @@ template Expected MachODumper::processLoadCommandData( MachOYAML::LoadCommand &LC, - const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd) { + const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd, + std::unique_ptr &Y) { return LoadCmd.Ptr + sizeof(StructType); } @@ -158,18 +201,20 @@ Expected MachODumper::processLoadCommandData( MachOYAML::LoadCommand &LC, - const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd) { - return extractSections(LoadCmd, - LC.Sections); + const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd, + std::unique_ptr &Y) { + return extractSections( + LoadCmd, LC.Sections, Y); } template <> Expected MachODumper::processLoadCommandData( MachOYAML::LoadCommand &LC, - const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd) { + const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd, + std::unique_ptr &Y) { return extractSections( - LoadCmd, LC.Sections); + LoadCmd, LC.Sections, Y); } template @@ -187,7 +232,8 @@ Expected MachODumper::processLoadCommandData( MachOYAML::LoadCommand &LC, - const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd) { + const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd, + std::unique_ptr &Y) { return readString(LC, LoadCmd); } @@ -195,7 +241,8 @@ Expected MachODumper::processLoadCommandData( MachOYAML::LoadCommand &LC, - const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd) { + const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd, + std::unique_ptr &Y) { return readString(LC, LoadCmd); } @@ -203,7 +250,8 @@ Expected MachODumper::processLoadCommandData( MachOYAML::LoadCommand &LC, - const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd) { + const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd, + std::unique_ptr &Y) { return readString(LC, LoadCmd); } @@ -211,7 +259,8 @@ Expected MachODumper::processLoadCommandData( MachOYAML::LoadCommand &LC, - const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd) { + const llvm::object::MachOObjectFile::LoadCommandInfo &LoadCmd, + std::unique_ptr &Y) { auto Start = LoadCmd.Ptr + sizeof(MachO::build_version_command); auto NTools = LC.Data.build_version_command_data.ntools; for (unsigned i = 0; i < NTools; ++i) { @@ -233,9 +282,6 @@ return std::move(Err); dumpLinkEdit(Y); - std::unique_ptr DICtx = DWARFContext::create(Obj); - if (auto Err = dwarf2yaml(*DICtx, Y->DWARF)) - return std::move(Err); return std::move(Y); } @@ -261,7 +307,7 @@ if (Obj.isLittleEndian() != sys::IsLittleEndianHost) MachO::swapStruct(LC.Data.load_command_data); if (Expected ExpectedEndPtr = - processLoadCommandData(LC, LoadCmd)) + processLoadCommandData(LC, LoadCmd, Y)) EndPtr = *ExpectedEndPtr; else return ExpectedEndPtr.takeError(); @@ -539,7 +585,8 @@ } Error macho2yaml(raw_ostream &Out, const object::MachOObjectFile &Obj) { - MachODumper Dumper(Obj); + std::unique_ptr DCtx = DWARFContext::create(Obj); + MachODumper Dumper(Obj, std::move(DCtx)); Expected> YAML = Dumper.dump(); if (!YAML) return YAML.takeError(); @@ -573,7 +620,8 @@ if (!SliceObj) return SliceObj.takeError(); - MachODumper Dumper(*SliceObj.get()); + std::unique_ptr DCtx = DWARFContext::create(*SliceObj.get()); + MachODumper Dumper(*SliceObj.get(), std::move(DCtx)); Expected> YAMLObj = Dumper.dump(); if (!YAMLObj) return YAMLObj.takeError(); diff --git a/llvm/tools/obj2yaml/obj2yaml.h b/llvm/tools/obj2yaml/obj2yaml.h --- a/llvm/tools/obj2yaml/obj2yaml.h +++ b/llvm/tools/obj2yaml/obj2yaml.h @@ -40,7 +40,15 @@ } } -llvm::Error dwarf2yaml(llvm::DWARFContext &DCtx, llvm::DWARFYAML::Data &Y); +llvm::Error dumpDebugAbbrev(llvm::DWARFContext &DCtx, llvm::DWARFYAML::Data &Y); llvm::Error dumpDebugARanges(llvm::DWARFContext &DCtx, llvm::DWARFYAML::Data &Y); +llvm::Error dumpDebugPubSections(llvm::DWARFContext &DCtx, + llvm::DWARFYAML::Data &Y); +llvm::Error dumpDebugInfo(llvm::DWARFContext &DCtx, llvm::DWARFYAML::Data &Y); +llvm::Error dumpDebugLines(llvm::DWARFContext &DCtx, llvm::DWARFYAML::Data &Y); +llvm::Error dumpDebugRanges(llvm::DWARFContext &DCtx, llvm::DWARFYAML::Data &Y); +llvm::Error dumpDebugStrings(llvm::DWARFContext &DCtx, + llvm::DWARFYAML::Data &Y); + #endif