Improves maintainability (edit/modify the tests without recompiling) and error messages (previously the failure would be a gtest failure mentioning nothing of the input or desired text) and the option to improve tests with more checks. (maybe these tests shouldn't all be in separate files - we could probably have DWARF yaml that contains multiple errors while still being fairly maintainable - the various invalid offsets (ref_addr, rnglists, ranges, etc) could probably be all in one test, but for the simple sake of the migration I just did the mechanical thing here)
60 lines
1.9 KiB
YAML
60 lines
1.9 KiB
YAML
# RUN: yaml2obj %s -o %t.o
|
|
# RUN: llvm-dwarfdump -verify %t.o | FileCheck --implicit-check-not=error: %s
|
|
|
|
--- !ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_EXEC
|
|
DWARF:
|
|
debug_str:
|
|
- ''
|
|
- /tmp/main.c
|
|
- main
|
|
- nested
|
|
debug_abbrev:
|
|
- Table:
|
|
- Code: 0x00000001
|
|
Tag: DW_TAG_compile_unit
|
|
Children: DW_CHILDREN_yes
|
|
Attributes:
|
|
- Attribute: DW_AT_low_pc
|
|
Form: DW_FORM_addr
|
|
- Attribute: DW_AT_high_pc
|
|
Form: DW_FORM_addr
|
|
- Attribute: DW_AT_name
|
|
Form: DW_FORM_strp
|
|
- Code: 0x00000002
|
|
Tag: DW_TAG_subprogram
|
|
Children: DW_CHILDREN_yes
|
|
Attributes:
|
|
- Attribute: DW_AT_name
|
|
Form: DW_FORM_strp
|
|
- Attribute: DW_AT_low_pc
|
|
Form: DW_FORM_addr
|
|
- Attribute: DW_AT_high_pc
|
|
Form: DW_FORM_addr
|
|
debug_info:
|
|
- Version: 4
|
|
AddrSize: 8
|
|
Entries:
|
|
- AbbrCode: 0x00000001
|
|
Values:
|
|
- Value: 0x0000000000001000
|
|
- Value: 0x0000000000002000
|
|
- Value: 0x0000000000000001
|
|
- AbbrCode: 0x00000002
|
|
Values:
|
|
- Value: 0x000000000000000D
|
|
- Value: 0x0000000000001000
|
|
- Value: 0x0000000000001500
|
|
- AbbrCode: 0x00000002
|
|
Values:
|
|
- Value: 0x0000000000000012
|
|
- Value: 0x0000000000001500
|
|
- Value: 0x0000000000002000
|
|
- AbbrCode: 0x00000000
|
|
- AbbrCode: 0x00000000
|
|
- AbbrCode: 0x00000000
|
|
|