mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:59:56 +00:00
[DWARFYAML] Add support for emitting multiple abbrev tables.
This patch adds support for emitting multiple abbrev tables. Currently, compilation units will always reference the first abbrev table. Reviewed By: jhenderson, labath Differential Revision: https://reviews.llvm.org/D86194
This commit is contained in:
parent
1cf2d56956
commit
6752521113
@ -39,6 +39,10 @@ struct Abbrev {
|
||||
std::vector<AttributeAbbrev> Attributes;
|
||||
};
|
||||
|
||||
struct AbbrevTable {
|
||||
std::vector<Abbrev> Table;
|
||||
};
|
||||
|
||||
struct ARangeDescriptor {
|
||||
llvm::yaml::Hex64 Address;
|
||||
yaml::Hex64 Length;
|
||||
@ -203,7 +207,7 @@ template <typename EntryType> struct ListTable {
|
||||
struct Data {
|
||||
bool IsLittleEndian;
|
||||
bool Is64BitAddrSize;
|
||||
std::vector<Abbrev> AbbrevDecls;
|
||||
std::vector<AbbrevTable> DebugAbbrev;
|
||||
std::vector<StringRef> DebugStrings;
|
||||
Optional<std::vector<StringOffsetsTable>> DebugStrOffsets;
|
||||
Optional<std::vector<ARange>> DebugAranges;
|
||||
@ -231,6 +235,7 @@ struct Data {
|
||||
|
||||
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::AttributeAbbrev)
|
||||
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::Abbrev)
|
||||
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::AbbrevTable)
|
||||
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::ARangeDescriptor)
|
||||
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::ARange)
|
||||
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::RangeEntry)
|
||||
@ -264,6 +269,10 @@ template <> struct MappingTraits<DWARFYAML::Data> {
|
||||
static void mapping(IO &IO, DWARFYAML::Data &DWARF);
|
||||
};
|
||||
|
||||
template <> struct MappingTraits<DWARFYAML::AbbrevTable> {
|
||||
static void mapping(IO &IO, DWARFYAML::AbbrevTable &AbbrevTable);
|
||||
};
|
||||
|
||||
template <> struct MappingTraits<DWARFYAML::Abbrev> {
|
||||
static void mapping(IO &IO, DWARFYAML::Abbrev &Abbrev);
|
||||
};
|
||||
|
@ -96,8 +96,10 @@ Error DWARFYAML::emitDebugStr(raw_ostream &OS, const DWARFYAML::Data &DI) {
|
||||
|
||||
Error DWARFYAML::emitDebugAbbrev(raw_ostream &OS, const DWARFYAML::Data &DI) {
|
||||
uint64_t AbbrevCode = 0;
|
||||
for (auto AbbrevDecl : DI.AbbrevDecls) {
|
||||
AbbrevCode = AbbrevDecl.Code ? (uint64_t)*AbbrevDecl.Code : AbbrevCode + 1;
|
||||
for (const DWARFYAML::AbbrevTable &AbbrevTable : DI.DebugAbbrev) {
|
||||
for (const DWARFYAML::Abbrev &AbbrevDecl : AbbrevTable.Table) {
|
||||
AbbrevCode =
|
||||
AbbrevDecl.Code ? (uint64_t)*AbbrevDecl.Code : AbbrevCode + 1;
|
||||
encodeULEB128(AbbrevCode, OS);
|
||||
encodeULEB128(AbbrevDecl.Tag, OS);
|
||||
OS.write(AbbrevDecl.Children);
|
||||
@ -111,9 +113,10 @@ Error DWARFYAML::emitDebugAbbrev(raw_ostream &OS, const DWARFYAML::Data &DI) {
|
||||
encodeULEB128(0, OS);
|
||||
}
|
||||
|
||||
// The abbreviations for a given compilation unit end with an entry consisting
|
||||
// of a 0 byte for the abbreviation code.
|
||||
// The abbreviations for a given compilation unit end with an entry
|
||||
// consisting of a 0 byte for the abbreviation code.
|
||||
OS.write_zeros(1);
|
||||
}
|
||||
|
||||
return Error::success();
|
||||
}
|
||||
@ -243,7 +246,7 @@ Error DWARFYAML::emitDebugGNUPubtypes(raw_ostream &OS, const Data &DI) {
|
||||
/*IsGNUStyle=*/true);
|
||||
}
|
||||
|
||||
static Expected<uint64_t> writeDIE(ArrayRef<DWARFYAML::Abbrev> AbbrevDecls,
|
||||
static Expected<uint64_t> writeDIE(ArrayRef<DWARFYAML::AbbrevTable> AbbrevTable,
|
||||
const dwarf::FormParams &Params,
|
||||
const DWARFYAML::Entry &Entry,
|
||||
raw_ostream &OS, bool IsLittleEndian) {
|
||||
@ -253,6 +256,13 @@ static Expected<uint64_t> writeDIE(ArrayRef<DWARFYAML::Abbrev> AbbrevDecls,
|
||||
if (AbbrCode == 0 || Entry.Values.empty())
|
||||
return OS.tell() - EntryBegin;
|
||||
|
||||
if (AbbrevTable.empty())
|
||||
return createStringError(
|
||||
errc::invalid_argument,
|
||||
"non-empty compilation unit should have an associated abbrev table");
|
||||
|
||||
ArrayRef<DWARFYAML::Abbrev> AbbrevDecls(AbbrevTable[0].Table);
|
||||
|
||||
if (AbbrCode > AbbrevDecls.size())
|
||||
return createStringError(
|
||||
errc::invalid_argument,
|
||||
@ -394,7 +404,7 @@ Error DWARFYAML::emitDebugInfo(raw_ostream &OS, const DWARFYAML::Data &DI) {
|
||||
|
||||
for (const DWARFYAML::Entry &Entry : Unit.Entries) {
|
||||
if (Expected<uint64_t> EntryLength = writeDIE(
|
||||
DI.AbbrevDecls, Params, Entry, EntryBufferOS, DI.IsLittleEndian))
|
||||
DI.DebugAbbrev, Params, Entry, EntryBufferOS, DI.IsLittleEndian))
|
||||
Length += *EntryLength;
|
||||
else
|
||||
return EntryLength.takeError();
|
||||
|
@ -32,7 +32,7 @@ SetVector<StringRef> DWARFYAML::Data::getNonEmptySectionNames() const {
|
||||
SecNames.insert("debug_line");
|
||||
if (!DebugAddr.empty())
|
||||
SecNames.insert("debug_addr");
|
||||
if (!AbbrevDecls.empty())
|
||||
if (!DebugAbbrev.empty())
|
||||
SecNames.insert("debug_abbrev");
|
||||
if (!CompileUnits.empty())
|
||||
SecNames.insert("debug_info");
|
||||
@ -60,7 +60,7 @@ void MappingTraits<DWARFYAML::Data>::mapping(IO &IO, DWARFYAML::Data &DWARF) {
|
||||
DWARFYAML::DWARFContext DWARFCtx;
|
||||
IO.setContext(&DWARFCtx);
|
||||
IO.mapOptional("debug_str", DWARF.DebugStrings);
|
||||
IO.mapOptional("debug_abbrev", DWARF.AbbrevDecls);
|
||||
IO.mapOptional("debug_abbrev", DWARF.DebugAbbrev);
|
||||
IO.mapOptional("debug_aranges", DWARF.DebugAranges);
|
||||
if (!DWARF.DebugRanges.empty() || !IO.outputting())
|
||||
IO.mapOptional("debug_ranges", DWARF.DebugRanges);
|
||||
@ -78,6 +78,11 @@ void MappingTraits<DWARFYAML::Data>::mapping(IO &IO, DWARFYAML::Data &DWARF) {
|
||||
IO.setContext(OldContext);
|
||||
}
|
||||
|
||||
void MappingTraits<DWARFYAML::AbbrevTable>::mapping(
|
||||
IO &IO, DWARFYAML::AbbrevTable &AbbrevTable) {
|
||||
IO.mapOptional("Table", AbbrevTable.Table);
|
||||
}
|
||||
|
||||
void MappingTraits<DWARFYAML::Abbrev>::mapping(IO &IO,
|
||||
DWARFYAML::Abbrev &Abbrev) {
|
||||
IO.mapOptional("Code", Abbrev.Code);
|
||||
|
@ -275,6 +275,7 @@ DWARF:
|
||||
- N
|
||||
- t
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
|
@ -264,6 +264,7 @@ DWARF:
|
||||
- N
|
||||
- t
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
|
@ -275,6 +275,7 @@ LoadCommands:
|
||||
reserved3: 0x00000000
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
|
@ -310,6 +310,7 @@ LinkEditData:
|
||||
- _main
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -638,6 +639,7 @@ LoadCommands:
|
||||
reserved3: 0x00000000
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 1
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
|
@ -323,6 +323,7 @@ DWARF:
|
||||
- int
|
||||
- char
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
|
@ -169,6 +169,7 @@ DWARF:
|
||||
- stripped2
|
||||
- main
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
|
@ -277,6 +277,7 @@ DWARF:
|
||||
debug_str:
|
||||
- World
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
|
@ -275,6 +275,7 @@ LoadCommands:
|
||||
reserved3: 0x00000000
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
|
@ -310,6 +310,7 @@ LinkEditData:
|
||||
- _main
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -640,6 +641,7 @@ LoadCommands:
|
||||
reserved3: 0x00000000
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 1
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
|
@ -30,6 +30,7 @@ DWARF:
|
||||
- main
|
||||
- inline1
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x0000000000000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
|
@ -30,6 +30,7 @@ DWARF:
|
||||
- main
|
||||
- inline1
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x0000000000000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
|
@ -29,6 +29,7 @@ DWARF:
|
||||
- ''
|
||||
- inline1
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x0000000000000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
|
@ -178,6 +178,7 @@ DWARF:
|
||||
- main
|
||||
- foo
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
|
@ -299,6 +299,7 @@ Slices:
|
||||
- int
|
||||
- char
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -777,6 +778,7 @@ Slices:
|
||||
- int
|
||||
- char
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
|
@ -384,6 +384,7 @@ DWARF:
|
||||
- argv
|
||||
- char
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
|
@ -312,6 +312,7 @@ DWARF:
|
||||
- bar
|
||||
- main
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
# RUN: yaml2obj --docnum=1 %s -o %t1.o
|
||||
# RUN: llvm-readobj --sections --section-data %t1.o | \
|
||||
# RUN: FileCheck -DSIZE=39 -DADDRALIGN=1 %s --check-prefixes=SHDR,CONTENT
|
||||
# RUN: FileCheck -DSIZE=54 -DADDRALIGN=1 %s --check-prefixes=SHDR,CONTENT
|
||||
|
||||
# SHDR: Index: 1
|
||||
# SHDR-NEXT: Name: .debug_abbrev (1)
|
||||
@ -42,9 +42,21 @@
|
||||
## ^--- Form: invalid ULEB128 (0x81) ^--- Attribute: reserved ULEB128 (0x2020)
|
||||
## ^- Attribute: reserved ULEB128 ^- DW_FORM_implicit_const ULEB128
|
||||
##
|
||||
# CONTENT-NEXT: 0020: CEC2F105 000000 |.......|
|
||||
# CONTENT-NEXT: 0020: CEC2F105 00000001
|
||||
## ^------- Value SLEB128 (12345678) ^--- attr terminator
|
||||
## ^- abbrev terminator
|
||||
## ^- abbreviation code ULEB128
|
||||
# CONTENT: 1101250E 0000022E |..........%.....|
|
||||
## ^- DW_TAG_compile_unit ULEB128 ^--- attr terminator
|
||||
## ^- DW_CHILDREN_yes 1-byte ^- abbreviation code ULEB128
|
||||
## ^- DW_AT_producer ULEB128 ^- DW_TAG_subprogram ULEB128
|
||||
## ^- DW_FORM_strp ULEB128
|
||||
# CONTENT-NEXT: 0030: 01110100 0000 |......|
|
||||
## ^- DW_CHILDREN_yes 1-byte
|
||||
## ^- DW_AT_low_pc ULEB128
|
||||
## ^- DW_FORM_addr UELB128
|
||||
## ^---- attr terminator
|
||||
## ^- abbrev table terminator
|
||||
# CONTENT-NEXT: )
|
||||
|
||||
--- !ELF
|
||||
@ -54,6 +66,7 @@ FileHeader:
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 1
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -90,6 +103,19 @@ DWARF:
|
||||
## who is followed by a SLEB128 value.
|
||||
Form: DW_FORM_implicit_const
|
||||
Value: 12345678
|
||||
- Table:
|
||||
- Code: 1
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
Attributes:
|
||||
- Attribute: DW_AT_producer
|
||||
Form: DW_FORM_strp
|
||||
- Code: 2
|
||||
Tag: DW_TAG_subprogram
|
||||
Children: DW_CHILDREN_yes
|
||||
Attributes:
|
||||
- Attribute: DW_AT_low_pc
|
||||
Form: DW_FORM_addr
|
||||
|
||||
## b) Generate the .debug_abbrev section from raw section content.
|
||||
|
||||
@ -149,6 +175,7 @@ Sections:
|
||||
Size: 0x10
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 1
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -170,6 +197,7 @@ Sections:
|
||||
Content: "00"
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 1
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -229,6 +257,7 @@ Sections:
|
||||
Type: SHT_STRTAB
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 1
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -256,6 +285,7 @@ FileHeader:
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
Attributes: []
|
||||
|
@ -115,6 +115,7 @@ FileHeader:
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 1
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -440,6 +441,7 @@ Sections:
|
||||
Size: 0x10
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 1
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -467,6 +469,7 @@ Sections:
|
||||
Content: "00"
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 1
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -532,6 +535,7 @@ Sections:
|
||||
Type: SHT_STRTAB
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 1
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -597,6 +601,7 @@ FileHeader:
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
Attributes:
|
||||
@ -647,6 +652,8 @@ FileHeader:
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_abbrev:
|
||||
- Table: []
|
||||
debug_info:
|
||||
- Length: 0x1234
|
||||
Version: 5
|
||||
@ -774,6 +781,7 @@ DWARF:
|
||||
- "/home/v/x/llvm/playground"
|
||||
- "main"
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 1
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -873,3 +881,24 @@ DWARF:
|
||||
debug_info:
|
||||
- Version: 4
|
||||
AbbrOffset: 0x00
|
||||
|
||||
## n) Test that yaml2obj emits an error message when a compilation unit has values but there is no associated abbrev table.
|
||||
|
||||
## RUN: not yaml2obj --docnum=16 %s 2>&1 | FileCheck %s --check-prefix=NO-ABBREV
|
||||
|
||||
# NO-ABBREV: yaml2obj: error: non-empty compilation unit should have an associated abbrev table
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
Machine: EM_X86_64
|
||||
DWARF:
|
||||
debug_info:
|
||||
- Version: 4
|
||||
AbbrOffset: 0x00
|
||||
Entries:
|
||||
- AbbrCode: 1
|
||||
Values:
|
||||
- Value: 0x1234
|
||||
|
@ -24,6 +24,7 @@ void dumpDebugAbbrev(DWARFContext &DCtx, DWARFYAML::Data &Y) {
|
||||
auto AbbrevSetPtr = DCtx.getDebugAbbrev();
|
||||
if (AbbrevSetPtr) {
|
||||
for (auto AbbrvDeclSet : *AbbrevSetPtr) {
|
||||
Y.DebugAbbrev.emplace_back();
|
||||
for (auto AbbrvDecl : AbbrvDeclSet.second) {
|
||||
DWARFYAML::Abbrev Abbrv;
|
||||
Abbrv.Code = AbbrvDecl.getCode();
|
||||
@ -38,7 +39,7 @@ void dumpDebugAbbrev(DWARFContext &DCtx, DWARFYAML::Data &Y) {
|
||||
AttAbrv.Value = Attribute.getImplicitConstValue();
|
||||
Abbrv.Attributes.push_back(AttAbrv);
|
||||
}
|
||||
Y.AbbrevDecls.push_back(Abbrv);
|
||||
Y.DebugAbbrev.back().Table.push_back(Abbrv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1363,6 +1363,7 @@ TEST(DWARFDebugInfo, TestChildIteratorsOnInvalidDie) {
|
||||
|
||||
TEST(DWARFDebugInfo, TestEmptyChildren) {
|
||||
const char *yamldata = "debug_abbrev:\n"
|
||||
" - Table:\n"
|
||||
" - Code: 0x00000001\n"
|
||||
" Tag: DW_TAG_compile_unit\n"
|
||||
" Children: DW_CHILDREN_yes\n"
|
||||
@ -1885,6 +1886,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidCURef) {
|
||||
- /tmp/main.c
|
||||
- main
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -1933,6 +1935,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidRefAddr) {
|
||||
- /tmp/main.c
|
||||
- main
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -1979,6 +1982,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidRanges) {
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -2016,6 +2020,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidRnglists) {
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -2053,6 +2058,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidStmtList) {
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -2089,6 +2095,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidStrp) {
|
||||
debug_str:
|
||||
- ''
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -2122,6 +2129,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidRefAddrBetween) {
|
||||
- /tmp/main.c
|
||||
- main
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -2169,6 +2177,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidLineSequence) {
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -2237,6 +2246,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidLineFileIndex) {
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -2307,6 +2317,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidLineTablePorlogueDirIndex) {
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -2378,6 +2389,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyDuplicateFileWarning) {
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -2454,6 +2466,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyCUDontShareLineTable) {
|
||||
- /tmp/main.c
|
||||
- /tmp/foo.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
@ -2569,6 +2582,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyCURangesIncomplete) {
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -2622,6 +2636,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyLexicalBlockRanges) {
|
||||
- /tmp/main.c
|
||||
- main
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -2687,6 +2702,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyOverlappingFunctionRanges) {
|
||||
- main
|
||||
- foo
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -2741,6 +2757,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyOverlappingLexicalBlockRanges) {
|
||||
- /tmp/main.c
|
||||
- main
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -2814,6 +2831,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyInvalidDIERange) {
|
||||
- /tmp/main.c
|
||||
- main
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -2866,6 +2884,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyElidedDoesntFail) {
|
||||
- main
|
||||
- elided
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -2928,6 +2947,7 @@ TEST(DWARFDebugInfo, TestDwarfVerifyNestedFunctions) {
|
||||
- main
|
||||
- nested
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
|
@ -21,6 +21,7 @@ namespace {
|
||||
TEST(DWARFDie, getLocations) {
|
||||
const char *yamldata = R"(
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
|
@ -1414,6 +1414,7 @@ TEST(GSYMTest, TestDWARFFunctionWithAddresses) {
|
||||
- /tmp/main.c
|
||||
- main
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -1493,6 +1494,7 @@ TEST(GSYMTest, TestDWARFFunctionWithAddressAndOffset) {
|
||||
- /tmp/main.c
|
||||
- main
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -1576,6 +1578,7 @@ TEST(GSYMTest, TestDWARFStructMethodNoMangled) {
|
||||
- dump
|
||||
- this
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -1696,6 +1699,7 @@ TEST(GSYMTest, TestDWARFTextRanges) {
|
||||
- dead_stripped
|
||||
- dead_stripped2
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -1793,6 +1797,7 @@ TEST(GSYMTest, TestDWARFInlineInfo) {
|
||||
- main
|
||||
- inline1
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -2048,6 +2053,7 @@ TEST(GSYMTest, TestDWARFNoLines) {
|
||||
- no_lines_no_decl
|
||||
- no_lines_with_decl
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -2293,7 +2299,6 @@ TEST(GSYMTest, TestDWARFDeadStripAddr4) {
|
||||
//
|
||||
// 0x0000004e: NULL
|
||||
|
||||
|
||||
StringRef yamldata = R"(
|
||||
debug_str:
|
||||
- ''
|
||||
@ -2303,6 +2308,7 @@ TEST(GSYMTest, TestDWARFDeadStripAddr4) {
|
||||
- stripped2
|
||||
- stripped3
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
@ -2445,6 +2451,7 @@ TEST(GSYMTest, TestDWARFDeadStripAddr8) {
|
||||
- stripped2
|
||||
- stripped3
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
|
Loading…
Reference in New Issue
Block a user