Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | |||||
--- !ELF | --- !ELF | ||||
FileHeader: | FileHeader: | ||||
Class: ELFCLASS64 | Class: ELFCLASS64 | ||||
Data: [[ENDIAN]] | Data: [[ENDIAN]] | ||||
Type: ET_EXEC | Type: ET_EXEC | ||||
Machine: EM_X86_64 | Machine: EM_X86_64 | ||||
DWARF: | DWARF: | ||||
debug_abbrev: | debug_abbrev: | ||||
- Table: | |||||
- Code: 1 | - Code: 1 | ||||
Tag: DW_TAG_compile_unit | Tag: DW_TAG_compile_unit | ||||
Children: DW_CHILDREN_no | Children: DW_CHILDREN_no | ||||
Attributes: | Attributes: | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_addr ## 0x01 | Form: DW_FORM_addr ## 0x01 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_block2 ## 0x03 | Form: DW_FORM_block2 ## 0x03 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_block4 ## 0x04 | Form: DW_FORM_block4 ## 0x04 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_data2 ## 0x05 | Form: DW_FORM_data2 ## 0x05 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_data4 ## 0x06 | Form: DW_FORM_data4 ## 0x06 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_data8 ## 0x07 | Form: DW_FORM_data8 ## 0x07 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_string ## 0x08 | Form: DW_FORM_string ## 0x08 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_block ## 0x09 | Form: DW_FORM_block ## 0x09 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_block1 ## 0x0a | Form: DW_FORM_block1 ## 0x0a | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_data1 ## 0x0b | Form: DW_FORM_data1 ## 0x0b | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_flag ## 0x0c | Form: DW_FORM_flag ## 0x0c | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_sdata ## 0x0d | Form: DW_FORM_sdata ## 0x0d | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_strp ## 0x0e | Form: DW_FORM_strp ## 0x0e | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_udata ## 0x0f | Form: DW_FORM_udata ## 0x0f | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_ref_addr ## 0x10 | Form: DW_FORM_ref_addr ## 0x10 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_ref1 ## 0x11 | Form: DW_FORM_ref1 ## 0x11 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_ref2 ## 0x12 | Form: DW_FORM_ref2 ## 0x12 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_ref4 ## 0x13 | Form: DW_FORM_ref4 ## 0x13 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_ref8 ## 0x14 | Form: DW_FORM_ref8 ## 0x14 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_ref_udata ## 0x15 | Form: DW_FORM_ref_udata ## 0x15 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_indirect ## 0x16 | Form: DW_FORM_indirect ## 0x16 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_sec_offset ## 0x17 | Form: DW_FORM_sec_offset ## 0x17 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_exprloc ## 0x18 | Form: DW_FORM_exprloc ## 0x18 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_strx ## 0x1a | Form: DW_FORM_strx ## 0x1a | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_addrx ## 0x1b | Form: DW_FORM_addrx ## 0x1b | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_ref_sup4 ## 0x1c | Form: DW_FORM_ref_sup4 ## 0x1c | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_strp_sup ## 0x1d | Form: DW_FORM_strp_sup ## 0x1d | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_data16 ## 0x1e | Form: DW_FORM_data16 ## 0x1e | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_line_strp ## 0x1f | Form: DW_FORM_line_strp ## 0x1f | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_ref_sig8 ## 0x20 | Form: DW_FORM_ref_sig8 ## 0x20 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_implicit_const ## 0x21 | Form: DW_FORM_implicit_const ## 0x21 | ||||
Value: 0x01 | Value: 0x01 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_loclistx ## 0x22 | Form: DW_FORM_loclistx ## 0x22 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_rnglistx ## 0x23 | Form: DW_FORM_rnglistx ## 0x23 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_ref_sup8 ## 0x24 | Form: DW_FORM_ref_sup8 ## 0x24 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_strx1 ## 0x25 | Form: DW_FORM_strx1 ## 0x25 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_strx2 ## 0x26 | Form: DW_FORM_strx2 ## 0x26 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_strx3 ## 0x27 | Form: DW_FORM_strx3 ## 0x27 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_strx4 ## 0x28 | Form: DW_FORM_strx4 ## 0x28 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_addrx1 ## 0x29 | Form: DW_FORM_addrx1 ## 0x29 | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_addrx2 ## 0x2a | Form: DW_FORM_addrx2 ## 0x2a | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_addrx3 ## 0x2b | Form: DW_FORM_addrx3 ## 0x2b | ||||
- Attribute: 0x01 | - Attribute: 0x01 | ||||
Form: DW_FORM_addrx4 ## 0x2c | Form: DW_FORM_addrx4 ## 0x2c | ||||
debug_info: | debug_info: | ||||
- Length: 0x1234 | - Length: 0x1234 | ||||
Version: 5 | Version: 5 | ||||
UnitType: DW_UT_type | UnitType: DW_UT_type | ||||
AbbrOffset: 0x1234 | AbbrOffset: 0x1234 | ||||
AddrSize: 4 | AddrSize: 4 | ||||
Entries: | Entries: | ||||
- AbbrCode: 1 | - AbbrCode: 1 | ||||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | - Length: 0x1234 | ||||
- Value: 0x12 ## DW_FORM_strx1 | - Value: 0x12 ## DW_FORM_strx1 | ||||
- Value: 0x1234 ## DW_FORM_strx2 | - Value: 0x1234 ## DW_FORM_strx2 | ||||
- Value: 0x123456 ## DW_FORM_strx3 (unimplemented) | - Value: 0x123456 ## DW_FORM_strx3 (unimplemented) | ||||
- Value: 0x12345678 ## DW_FORM_strx4 | - Value: 0x12345678 ## DW_FORM_strx4 | ||||
- Value: 0x12 ## DW_FORM_addrx1 | - Value: 0x12 ## DW_FORM_addrx1 | ||||
- Value: 0x1234 ## DW_FORM_addrx2 | - Value: 0x1234 ## DW_FORM_addrx2 | ||||
- Value: 0x123456 ## DW_FORM_addrx3 (unimplemented) | - Value: 0x123456 ## DW_FORM_addrx3 (unimplemented) | ||||
- Value: 0x12345678 ## DW_FORM_addrx4 | - Value: 0x12345678 ## DW_FORM_addrx4 | ||||
- Length: 0x1234 | - Length: 0x1234 | ||||
Version: 5 | Version: 5 | ||||
## Test another unit type. | ## Test another unit type. | ||||
UnitType: DW_UT_compile | UnitType: DW_UT_compile | ||||
AbbrevTableID: 0 | |||||
AbbrOffset: 0x1234 | AbbrOffset: 0x1234 | ||||
AddrSize: 4 | AddrSize: 4 | ||||
Entries: | Entries: | ||||
- AbbrCode: 0 | - AbbrCode: 0 | ||||
Values: [] | Values: [] | ||||
- Length: 0x5678 | - Length: 0x5678 | ||||
## Test DWARFv4 | ## Test DWARFv4 | ||||
Version: 4 | Version: 4 | ||||
AbbrevTableID: 0 | |||||
AbbrOffset: 0x5678 | AbbrOffset: 0x5678 | ||||
AddrSize: 4 | AddrSize: 4 | ||||
Entries: | Entries: | ||||
- AbbrCode: 1 | - AbbrCode: 1 | ||||
Values: | Values: | ||||
- Value: 0x12345678 ## DW_FORM_addr | - Value: 0x12345678 ## DW_FORM_addr | ||||
- BlockData: ## DW_FORM_block2 | - BlockData: ## DW_FORM_block2 | ||||
- 0x12 | - 0x12 | ||||
- 0x34 | - 0x34 | ||||
▲ Show 20 Lines • Show All 147 Lines • ▼ Show 20 Lines | FileHeader: | ||||
Type: ET_EXEC | Type: ET_EXEC | ||||
Machine: EM_X86_64 | Machine: EM_X86_64 | ||||
Sections: | Sections: | ||||
- Name: .debug_info | - Name: .debug_info | ||||
Type: SHT_PROGBITS | Type: SHT_PROGBITS | ||||
Size: 0x10 | Size: 0x10 | ||||
DWARF: | DWARF: | ||||
debug_abbrev: | debug_abbrev: | ||||
- Table: | |||||
- Code: 1 | - Code: 1 | ||||
Tag: DW_TAG_compile_unit | Tag: DW_TAG_compile_unit | ||||
Children: DW_CHILDREN_no | Children: DW_CHILDREN_no | ||||
Attributes: [] | Attributes: [] | ||||
debug_info: | debug_info: | ||||
- Length: 0x1234 | - Length: 0x1234 | ||||
Version: 5 | Version: 5 | ||||
UnitType: DW_UT_type | UnitType: DW_UT_type | ||||
AbbrOffset: 0x1234 | AbbrOffset: 0x1234 | ||||
Entries: [] | Entries: [] | ||||
## e) Test that yaml2obj emits an error message when both the "Content" and the | ## e) Test that yaml2obj emits an error message when both the "Content" and the | ||||
## "debug_info" entry are specified at the same time. | ## "debug_info" entry are specified at the same time. | ||||
# RUN: not yaml2obj --docnum=5 %s 2>&1 | FileCheck %s --check-prefix=AMBIGUOUS-CONTENT | # RUN: not yaml2obj --docnum=5 %s 2>&1 | FileCheck %s --check-prefix=AMBIGUOUS-CONTENT | ||||
--- !ELF | --- !ELF | ||||
FileHeader: | FileHeader: | ||||
Class: ELFCLASS64 | Class: ELFCLASS64 | ||||
Data: ELFDATA2LSB | Data: ELFDATA2LSB | ||||
Type: ET_EXEC | Type: ET_EXEC | ||||
Machine: EM_X86_64 | Machine: EM_X86_64 | ||||
Sections: | Sections: | ||||
- Name: .debug_info | - Name: .debug_info | ||||
Type: SHT_PROGBITS | Type: SHT_PROGBITS | ||||
Content: "00" | Content: "00" | ||||
DWARF: | DWARF: | ||||
debug_abbrev: | debug_abbrev: | ||||
- Table: | |||||
- Code: 1 | - Code: 1 | ||||
Tag: DW_TAG_compile_unit | Tag: DW_TAG_compile_unit | ||||
Children: DW_CHILDREN_no | Children: DW_CHILDREN_no | ||||
Attributes: [] | Attributes: [] | ||||
debug_info: | debug_info: | ||||
- Length: 0x1234 | - Length: 0x1234 | ||||
Version: 5 | Version: 5 | ||||
UnitType: DW_UT_type | UnitType: DW_UT_type | ||||
AbbrOffset: 0x1234 | AbbrOffset: 0x1234 | ||||
Entries: [] | Entries: [] | ||||
## f) Test that all the properties can be overridden by the section header when | ## f) Test that all the properties can be overridden by the section header when | ||||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | - Name: .debug_info | ||||
Info: 1 ## 0 by default. | Info: 1 ## 0 by default. | ||||
AddressAlign: 2 ## 0 by default. | AddressAlign: 2 ## 0 by default. | ||||
Address: 0x2020 ## 0x00 by default. | Address: 0x2020 ## 0x00 by default. | ||||
Offset: 0x50 ## 0x40 for the first section. | Offset: 0x50 ## 0x40 for the first section. | ||||
- Name: .sec ## Linked by .debug_info. | - Name: .sec ## Linked by .debug_info. | ||||
Type: SHT_STRTAB | Type: SHT_STRTAB | ||||
DWARF: | DWARF: | ||||
debug_abbrev: | debug_abbrev: | ||||
- Table: | |||||
- Code: 1 | - Code: 1 | ||||
Tag: DW_TAG_compile_unit | Tag: DW_TAG_compile_unit | ||||
Children: DW_CHILDREN_no | Children: DW_CHILDREN_no | ||||
Attributes: [] | Attributes: [] | ||||
debug_info: | debug_info: | ||||
- Length: 0x1234 | - Length: 0x1234 | ||||
Version: 5 | Version: 5 | ||||
UnitType: DW_UT_type | UnitType: DW_UT_type | ||||
AbbrOffset: 0x1234 | AbbrOffset: 0x1234 | ||||
Entries: | Entries: | ||||
- AbbrCode: 0 | - AbbrCode: 0 | ||||
Values: [] | Values: [] | ||||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
--- !ELF | --- !ELF | ||||
FileHeader: | FileHeader: | ||||
Class: ELFCLASS32 | Class: ELFCLASS32 | ||||
Data: ELFDATA2LSB | Data: ELFDATA2LSB | ||||
Type: ET_EXEC | Type: ET_EXEC | ||||
Machine: EM_X86_64 | Machine: EM_X86_64 | ||||
DWARF: | DWARF: | ||||
debug_abbrev: | debug_abbrev: | ||||
- Table: | |||||
- Tag: DW_TAG_compile_unit | - Tag: DW_TAG_compile_unit | ||||
Children: DW_CHILDREN_yes | Children: DW_CHILDREN_yes | ||||
Attributes: | Attributes: | ||||
- Attribute: DW_AT_low_pc | - Attribute: DW_AT_low_pc | ||||
Form: DW_FORM_data4 | Form: DW_FORM_data4 | ||||
- Attribute: DW_AT_high_pc | - Attribute: DW_AT_high_pc | ||||
Form: DW_FORM_data2 | Form: DW_FORM_data2 | ||||
- Tag: DW_TAG_subprogram | - Tag: DW_TAG_subprogram | ||||
Children: DW_CHILDREN_no | Children: DW_CHILDREN_no | ||||
Attributes: | Attributes: | ||||
- Attribute: DW_AT_low_pc | - Attribute: DW_AT_low_pc | ||||
Form: DW_FORM_data2 | Form: DW_FORM_data2 | ||||
- Attribute: DW_AT_high_pc | - Attribute: DW_AT_high_pc | ||||
Form: DW_FORM_data4 | Form: DW_FORM_data4 | ||||
debug_info: | debug_info: | ||||
- Length: 0x1234 | - Length: 0x1234 | ||||
Version: 5 | Version: 5 | ||||
UnitType: DW_UT_type | UnitType: DW_UT_type | ||||
AbbrOffset: 0x1234 | AbbrOffset: 0x1234 | ||||
Entries: | Entries: | ||||
## Test that yaml2obj emits values when the abbrev code is specified. | ## Test that yaml2obj emits values when the abbrev code is specified. | ||||
- AbbrCode: 2 | - AbbrCode: 2 | ||||
Values: | Values: | ||||
- Value: 0x1234 | - Value: 0x1234 | ||||
- Value: 0x87654321 | - Value: 0x87654321 | ||||
## Test that yaml2obj emits values when the abbrev code is specified to | ## Test that yaml2obj emits values when the abbrev code is specified to | ||||
## be lower than the first abbrev. | ## be lower than the first abbrev. | ||||
- AbbrCode: 1 | - AbbrCode: 1 | ||||
Values: | Values: | ||||
- Value: 0x87654321 | - Value: 0x87654321 | ||||
- Value: 0x1234 | - Value: 0x1234 | ||||
## Test that yaml2obj ignores the contents of entries with abbrev code 0. | ## Test that yaml2obj ignores the contents of entries with abbrev code 0. | ||||
- AbbrCode: 0 | - AbbrCode: 0 | ||||
Values: | Values: | ||||
- Value: 0x1234 | - Value: 0x1234 | ||||
## i) Test that yaml2obj reports an error when 'debug_info' has values in its | ## i) Test that yaml2obj reports an error when 'debug_info' has values in its | ||||
Higuoxing: Added test. | |||||
## entries but 'debug_abbrev' doesn't have enough attributes for them. | ## entries but 'debug_abbrev' doesn't have enough attributes for them. | ||||
# RUN: not yaml2obj --docnum=10 %s -o %t10.o 2>&1 | \ | # RUN: not yaml2obj --docnum=10 %s -o %t10.o 2>&1 | \ | ||||
# RUN: FileCheck %s --check-prefixes=ERROR | # RUN: FileCheck %s --check-prefixes=ERROR | ||||
# ERROR: yaml2obj: error: abbrev code must be less than or equal to the number of entries in abbreviation table | # ERROR: yaml2obj: error: abbrev code must be less than or equal to the number of entries in abbreviation table | ||||
Perhaps worth including the index and table count values in this error message to make it easier for people to identify the problem. jhenderson: Perhaps worth including the index and table count values in this error message to make it… | |||||
I've included the abbrev table ID and compilation unit count values in test case (n). Can we prettify the error message in test case (i) in a follow-up patch? Higuoxing: I've included the abbrev table ID and compilation unit count values in test case (n). Can we… | |||||
Not Done ReplyInline ActionsThat's fine. jhenderson: That's fine. | |||||
--- !ELF | --- !ELF | ||||
FileHeader: | FileHeader: | ||||
Class: ELFCLASS64 | Class: ELFCLASS64 | ||||
Data: ELFDATA2LSB | Data: ELFDATA2LSB | ||||
Type: ET_EXEC | Type: ET_EXEC | ||||
Machine: EM_X86_64 | Machine: EM_X86_64 | ||||
DWARF: | DWARF: | ||||
debug_abbrev: | |||||
- ID: 0 | |||||
debug_info: | debug_info: | ||||
- Length: 0x1234 | - Length: 0x1234 | ||||
Version: 5 | Version: 5 | ||||
UnitType: DW_UT_type | UnitType: DW_UT_type | ||||
AbbrOffset: 0x1234 | AbbrOffset: 0x1234 | ||||
Entries: | Entries: | ||||
- AbbrCode: 1 | - AbbrCode: 1 | ||||
Values: | Values: | ||||
▲ Show 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | FileHeader: | ||||
Machine: EM_X86_64 | Machine: EM_X86_64 | ||||
DWARF: | DWARF: | ||||
debug_str: | debug_str: | ||||
- "clang version 10.0.0 " | - "clang version 10.0.0 " | ||||
- "hello.c" | - "hello.c" | ||||
- "/home/v/x/llvm/playground" | - "/home/v/x/llvm/playground" | ||||
- "main" | - "main" | ||||
debug_abbrev: | debug_abbrev: | ||||
- Table: | |||||
- Code: 1 | - Code: 1 | ||||
Tag: DW_TAG_compile_unit | Tag: DW_TAG_compile_unit | ||||
Children: DW_CHILDREN_yes | Children: DW_CHILDREN_yes | ||||
Attributes: | Attributes: | ||||
- Attribute: DW_AT_producer | - Attribute: DW_AT_producer | ||||
Form: DW_FORM_strp | Form: DW_FORM_strp | ||||
- Attribute: DW_AT_language | - Attribute: DW_AT_language | ||||
Form: DW_FORM_data2 | Form: DW_FORM_data2 | ||||
- Attribute: DW_AT_name | - Attribute: DW_AT_name | ||||
Form: DW_FORM_strp | Form: DW_FORM_strp | ||||
- Attribute: DW_AT_stmt_list | - Attribute: DW_AT_stmt_list | ||||
Form: DW_FORM_sec_offset | Form: DW_FORM_sec_offset | ||||
- Attribute: DW_AT_comp_dir | - Attribute: DW_AT_comp_dir | ||||
Form: DW_FORM_strp | Form: DW_FORM_strp | ||||
- Attribute: DW_AT_low_pc | - Attribute: DW_AT_low_pc | ||||
Form: DW_FORM_addr | Form: DW_FORM_addr | ||||
- Attribute: DW_AT_high_pc | - Attribute: DW_AT_high_pc | ||||
Form: DW_FORM_data4 | Form: DW_FORM_data4 | ||||
- Code: 2 | - Code: 2 | ||||
Tag: DW_TAG_subprogram | Tag: DW_TAG_subprogram | ||||
Children: DW_CHILDREN_no | Children: DW_CHILDREN_no | ||||
Attributes: | Attributes: | ||||
- Attribute: DW_AT_low_pc | - Attribute: DW_AT_low_pc | ||||
Form: DW_FORM_addr | Form: DW_FORM_addr | ||||
- Attribute: DW_AT_high_pc | - Attribute: DW_AT_high_pc | ||||
Form: DW_FORM_data4 | Form: DW_FORM_data4 | ||||
- Attribute: DW_AT_name | - Attribute: DW_AT_name | ||||
Form: DW_FORM_strp | Form: DW_FORM_strp | ||||
debug_info: | debug_info: | ||||
- Version: 4 | - Version: 4 | ||||
AbbrOffset: 0x00 | AbbrOffset: 0x00 | ||||
Entries: | Entries: | ||||
- AbbrCode: 1 | - AbbrCode: 1 | ||||
Values: | Values: | ||||
- Value: 0x00 ## DW_AT_producer [DW_FORM_strp] | - Value: 0x00 ## DW_AT_producer [DW_FORM_strp] | ||||
- Value: 0x0c ## DW_LANG_C99, DW_AT_language [DW_FORM_data2] | - Value: 0x0c ## DW_LANG_C99, DW_AT_language [DW_FORM_data2] | ||||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | FileHeader: | ||||
Class: ELFCLASS[[BITS]] | Class: ELFCLASS[[BITS]] | ||||
Data: ELFDATA2LSB | Data: ELFDATA2LSB | ||||
Type: ET_EXEC | Type: ET_EXEC | ||||
Machine: EM_X86_64 | Machine: EM_X86_64 | ||||
DWARF: | DWARF: | ||||
debug_info: | debug_info: | ||||
- Version: 4 | - Version: 4 | ||||
AbbrOffset: 0x00 | AbbrOffset: 0x00 | ||||
## n) Test that yaml2obj emits an error message when a compilation unit doesn't have | |||||
## an associated abbrev table. | |||||
# RUN: not yaml2obj --docnum=16 %s 2>&1 | FileCheck %s --check-prefix=MISSING-ABBREV | |||||
# MISSING-ABBREV: yaml2obj: error: cannot find abbrev table whose ID is 0 | |||||
--- !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 | |||||
## o) Test that yaml2obj emits an error message when multiple abbrev tables are assigned | |||||
## the same ID. | |||||
jhendersonUnsubmitted Same as Mach-O, this really is a debug_abbrev test, not a debug_info test. jhenderson: Same as Mach-O, this really is a debug_abbrev test, not a debug_info test. | |||||
# RUN: not yaml2obj --docnum=17 %s 2>&1 | FileCheck %s --check-prefix=ID-COLLISION | |||||
# ID-COLLISION: yaml2obj: error: the ID (1) of abbrev table with index 1 has been used | |||||
--- !ELF | |||||
FileHeader: | |||||
Class: ELFCLASS64 | |||||
Data: ELFDATA2LSB | |||||
Type: ET_EXEC | |||||
Machine: EM_X86_64 | |||||
DWARF: | |||||
debug_abbrev: | |||||
- ID: 1 | |||||
- ID: 1 |
Added test.