forked from OSchip/llvm-project
Migrate DWARFVerifier tests to lit-based yaml instead of gtest with embedded yaml
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)
This commit is contained in:
parent
50efbf9cbe
commit
2af4db7d5c
|
@ -0,0 +1,74 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -debug-line -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_line...
|
||||
# CHECK-NEXT: error: two compile unit DIEs, 0x0000000b and 0x0000001f, have the same DW_AT_stmt_list section offset:
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
- /tmp/foo.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Attribute: DW_AT_stmt_list
|
||||
Form: DW_FORM_sec_offset
|
||||
debug_info:
|
||||
- Version: 4
|
||||
AddrSize: 8
|
||||
Entries:
|
||||
- AbbrCode: 0x00000001
|
||||
Values:
|
||||
- Value: 0x0000000000000001
|
||||
- Value: 0x0000000000000000
|
||||
- Length: 16
|
||||
Version: 4
|
||||
AbbrevTableID: 0
|
||||
AddrSize: 8
|
||||
Entries:
|
||||
- AbbrCode: 0x00000001
|
||||
Values:
|
||||
- Value: 0x000000000000000D
|
||||
- Value: 0x0000000000000000
|
||||
debug_line:
|
||||
- Version: 2
|
||||
MinInstLength: 1
|
||||
DefaultIsStmt: 1
|
||||
LineBase: 251
|
||||
LineRange: 14
|
||||
OpcodeBase: 13
|
||||
StandardOpcodeLengths: [ 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 ]
|
||||
IncludeDirs:
|
||||
- /tmp
|
||||
Files:
|
||||
- Name: main.c
|
||||
DirIdx: 1
|
||||
ModTime: 0
|
||||
Length: 0
|
||||
Opcodes:
|
||||
- Opcode: DW_LNS_extended_op
|
||||
ExtLen: 9
|
||||
SubOpcode: DW_LNE_set_address
|
||||
Data: 4096
|
||||
- Opcode: DW_LNS_advance_line
|
||||
SData: 9
|
||||
Data: 4096
|
||||
- Opcode: DW_LNS_copy
|
||||
Data: 4096
|
||||
- Opcode: DW_LNS_advance_pc
|
||||
Data: 256
|
||||
- Opcode: DW_LNS_extended_op
|
||||
ExtLen: 1
|
||||
SubOpcode: DW_LNE_end_sequence
|
||||
Data: 256
|
|
@ -0,0 +1,49 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_info Unit Header Chain...
|
||||
# CHECK-NEXT: error: DIE address ranges are not contained in its parent's ranges:
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
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_no
|
||||
Attributes:
|
||||
- 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: 0x0000000000001500
|
||||
- Value: 0x0000000000000001
|
||||
- AbbrCode: 0x00000002
|
||||
Values:
|
||||
- Value: 0x0000000000001000
|
||||
- Value: 0x0000000000002000
|
||||
- AbbrCode: 0x00000000
|
|
@ -0,0 +1,70 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: llvm-dwarfdump -debug-line -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_line...
|
||||
# CHECK-NEXT: warning: .debug_line[0x00000000].prologue.file_names[2] is a duplicate of file_names[1]
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Attribute: DW_AT_stmt_list
|
||||
Form: DW_FORM_sec_offset
|
||||
debug_info:
|
||||
- Version: 4
|
||||
AddrSize: 8
|
||||
Entries:
|
||||
- AbbrCode: 0x00000001
|
||||
Values:
|
||||
- Value: 0x0000000000000001
|
||||
- Value: 0x0000000000000000
|
||||
debug_line:
|
||||
- Version: 2
|
||||
MinInstLength: 1
|
||||
DefaultIsStmt: 1
|
||||
LineBase: 251
|
||||
LineRange: 14
|
||||
OpcodeBase: 13
|
||||
StandardOpcodeLengths: [ 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 ]
|
||||
IncludeDirs:
|
||||
- /tmp
|
||||
Files:
|
||||
- Name: main.c
|
||||
DirIdx: 1
|
||||
ModTime: 0
|
||||
Length: 0
|
||||
- Name: main.c
|
||||
DirIdx: 1
|
||||
ModTime: 0
|
||||
Length: 0
|
||||
Opcodes:
|
||||
- Opcode: DW_LNS_extended_op
|
||||
ExtLen: 9
|
||||
SubOpcode: DW_LNE_set_address
|
||||
Data: 4096
|
||||
- Opcode: DW_LNS_advance_line
|
||||
SData: 9
|
||||
Data: 4096
|
||||
- Opcode: DW_LNS_copy
|
||||
Data: 4096
|
||||
- Opcode: DW_LNS_advance_pc
|
||||
Data: 16
|
||||
- Opcode: DW_LNS_set_file
|
||||
Data: 1
|
||||
- Opcode: DW_LNS_extended_op
|
||||
ExtLen: 1
|
||||
SubOpcode: DW_LNE_end_sequence
|
||||
Data: 2
|
|
@ -0,0 +1,56 @@
|
|||
# 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
|
||||
- elided
|
||||
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_no
|
||||
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: 0x0000000000002000
|
||||
- AbbrCode: 0x00000002
|
||||
Values:
|
||||
- Value: 0x0000000000000012
|
||||
- Value: 0x0000000000002000
|
||||
- Value: 0x0000000000002000
|
||||
- AbbrCode: 0x00000000
|
|
@ -0,0 +1,44 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_info Unit Header Chain...
|
||||
# CHECK-NEXT: error: DW_FORM_ref4 CU offset 0x00001234 is invalid (must be less than CU size of 0x0000001a):
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
- main
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Code: 0x00000002
|
||||
Tag: DW_TAG_subprogram
|
||||
Children: DW_CHILDREN_no
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Attribute: DW_AT_type
|
||||
Form: DW_FORM_ref4
|
||||
debug_info:
|
||||
- Version: 4
|
||||
AddrSize: 8
|
||||
Entries:
|
||||
- AbbrCode: 0x00000001
|
||||
Values:
|
||||
- Value: 0x0000000000000001
|
||||
- AbbrCode: 0x00000002
|
||||
Values:
|
||||
- Value: 0x000000000000000D
|
||||
- Value: 0x0000000000001234
|
||||
- AbbrCode: 0x00000000
|
|
@ -0,0 +1,47 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_info Unit Header Chain...
|
||||
# CHECK-NEXT: error: Invalid address range
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
- main
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Code: 0x00000002
|
||||
Tag: DW_TAG_subprogram
|
||||
Children: DW_CHILDREN_no
|
||||
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: 0x0000000000000001
|
||||
- AbbrCode: 0x00000002
|
||||
Values:
|
||||
- Value: 0x000000000000000D
|
||||
- Value: 0x0000000000001000
|
||||
- Value: 0x0000000000000900
|
||||
- AbbrCode: 0x00000000
|
|
@ -0,0 +1,66 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -debug-line -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_line...
|
||||
# CHECK-NEXT: error: .debug_line[0x00000000][1] has invalid file index 5 (valid values are [1,1]):
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Attribute: DW_AT_stmt_list
|
||||
Form: DW_FORM_sec_offset
|
||||
debug_info:
|
||||
- Version: 4
|
||||
AddrSize: 8
|
||||
Entries:
|
||||
- AbbrCode: 0x00000001
|
||||
Values:
|
||||
- Value: 0x0000000000000001
|
||||
- Value: 0x0000000000000000
|
||||
debug_line:
|
||||
- Version: 2
|
||||
MinInstLength: 1
|
||||
DefaultIsStmt: 1
|
||||
LineBase: 251
|
||||
LineRange: 14
|
||||
OpcodeBase: 13
|
||||
StandardOpcodeLengths: [ 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 ]
|
||||
IncludeDirs:
|
||||
- /tmp
|
||||
Files:
|
||||
- Name: main.c
|
||||
DirIdx: 1
|
||||
ModTime: 0
|
||||
Length: 0
|
||||
Opcodes:
|
||||
- Opcode: DW_LNS_extended_op
|
||||
ExtLen: 9
|
||||
SubOpcode: DW_LNE_set_address
|
||||
Data: 4096
|
||||
- Opcode: DW_LNS_advance_line
|
||||
SData: 9
|
||||
Data: 4096
|
||||
- Opcode: DW_LNS_copy
|
||||
Data: 4096
|
||||
- Opcode: DW_LNS_advance_pc
|
||||
Data: 16
|
||||
- Opcode: DW_LNS_set_file
|
||||
Data: 5
|
||||
- Opcode: DW_LNS_extended_op
|
||||
ExtLen: 1
|
||||
SubOpcode: DW_LNE_end_sequence
|
||||
Data: 5
|
|
@ -0,0 +1,64 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -debug-line -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_line...
|
||||
# CHECK-NEXT: error: .debug_line[0x00000000] row[1] decreases in address from previous row:
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Attribute: DW_AT_stmt_list
|
||||
Form: DW_FORM_sec_offset
|
||||
debug_info:
|
||||
- Version: 4
|
||||
AddrSize: 8
|
||||
Entries:
|
||||
- AbbrCode: 0x00000001
|
||||
Values:
|
||||
- Value: 0x0000000000000001
|
||||
- Value: 0x0000000000000000
|
||||
debug_line:
|
||||
- Version: 2
|
||||
MinInstLength: 1
|
||||
DefaultIsStmt: 1
|
||||
LineBase: 251
|
||||
LineRange: 14
|
||||
OpcodeBase: 13
|
||||
StandardOpcodeLengths: [ 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 ]
|
||||
IncludeDirs:
|
||||
- /tmp
|
||||
Files:
|
||||
- Name: main.c
|
||||
DirIdx: 1
|
||||
ModTime: 0
|
||||
Length: 0
|
||||
Opcodes:
|
||||
- Opcode: DW_LNS_extended_op
|
||||
ExtLen: 9
|
||||
SubOpcode: DW_LNE_set_address
|
||||
Data: 4112
|
||||
- Opcode: DW_LNS_advance_line
|
||||
SData: 9
|
||||
Data: 4112
|
||||
- Opcode: DW_LNS_copy
|
||||
Data: 4112
|
||||
- Opcode: DW_LNS_advance_pc
|
||||
Data: 18446744073709551600
|
||||
- Opcode: DW_LNS_extended_op
|
||||
ExtLen: 1
|
||||
SubOpcode: DW_LNE_end_sequence
|
||||
Data: 18446744073709551600
|
|
@ -0,0 +1,66 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -debug-line -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_line...
|
||||
# CHECK-NEXT: error: .debug_line[0x00000000].prologue.file_names[1].dir_idx contains an invalid index: 2
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Attribute: DW_AT_stmt_list
|
||||
Form: DW_FORM_sec_offset
|
||||
debug_info:
|
||||
- Version: 4
|
||||
AddrSize: 8
|
||||
Entries:
|
||||
- AbbrCode: 0x00000001
|
||||
Values:
|
||||
- Value: 0x0000000000000001
|
||||
- Value: 0x0000000000000000
|
||||
debug_line:
|
||||
- Version: 2
|
||||
MinInstLength: 1
|
||||
DefaultIsStmt: 1
|
||||
LineBase: 251
|
||||
LineRange: 14
|
||||
OpcodeBase: 13
|
||||
StandardOpcodeLengths: [ 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 ]
|
||||
IncludeDirs:
|
||||
- /tmp
|
||||
Files:
|
||||
- Name: main.c
|
||||
DirIdx: 2
|
||||
ModTime: 0
|
||||
Length: 0
|
||||
Opcodes:
|
||||
- Opcode: DW_LNS_extended_op
|
||||
ExtLen: 9
|
||||
SubOpcode: DW_LNE_set_address
|
||||
Data: 4096
|
||||
- Opcode: DW_LNS_advance_line
|
||||
SData: 9
|
||||
Data: 4096
|
||||
- Opcode: DW_LNS_copy
|
||||
Data: 4096
|
||||
- Opcode: DW_LNS_advance_pc
|
||||
Data: 16
|
||||
- Opcode: DW_LNS_set_file
|
||||
Data: 1
|
||||
- Opcode: DW_LNS_extended_op
|
||||
ExtLen: 1
|
||||
SubOpcode: DW_LNE_end_sequence
|
||||
Data: 1
|
|
@ -0,0 +1,33 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_info Unit Header Chain...
|
||||
# CHECK-NEXT: error: DW_AT_ranges offset is beyond .debug_ranges bounds: 0x00001000
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Attribute: DW_AT_ranges
|
||||
Form: DW_FORM_sec_offset
|
||||
debug_info:
|
||||
- Version: 4
|
||||
AddrSize: 8
|
||||
Entries:
|
||||
- AbbrCode: 0x00000001
|
||||
Values:
|
||||
- Value: 0x0000000000000001
|
||||
- Value: 0x0000000000001000
|
|
@ -0,0 +1,44 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_info Unit Header Chain...
|
||||
# CHECK-NEXT: error: DW_FORM_ref_addr offset beyond .debug_info bounds:
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
- main
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Code: 0x00000002
|
||||
Tag: DW_TAG_subprogram
|
||||
Children: DW_CHILDREN_no
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Attribute: DW_AT_type
|
||||
Form: DW_FORM_ref_addr
|
||||
debug_info:
|
||||
- Version: 4
|
||||
AddrSize: 8
|
||||
Entries:
|
||||
- AbbrCode: 0x00000001
|
||||
Values:
|
||||
- Value: 0x0000000000000001
|
||||
- AbbrCode: 0x00000002
|
||||
Values:
|
||||
- Value: 0x000000000000000D
|
||||
- Value: 0x0000000000001234
|
||||
- AbbrCode: 0x00000000
|
|
@ -0,0 +1,44 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_info references...
|
||||
# CHECK-NEXT: error: invalid DIE reference 0x00000011. Offset is in between DIEs:
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
- main
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Code: 0x00000002
|
||||
Tag: DW_TAG_subprogram
|
||||
Children: DW_CHILDREN_no
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Attribute: DW_AT_type
|
||||
Form: DW_FORM_ref_addr
|
||||
debug_info:
|
||||
- Version: 4
|
||||
AddrSize: 8
|
||||
Entries:
|
||||
- AbbrCode: 0x00000001
|
||||
Values:
|
||||
- Value: 0x0000000000000001
|
||||
- AbbrCode: 0x00000002
|
||||
Values:
|
||||
- Value: 0x000000000000000D
|
||||
- Value: 0x0000000000000011
|
||||
- AbbrCode: 0x00000000
|
|
@ -0,0 +1,34 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_info Unit Header Chain...
|
||||
# CHECK-NEXT: error: DW_AT_ranges offset is beyond .debug_rnglists bounds: 0x00001000
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Attribute: DW_AT_ranges
|
||||
Form: DW_FORM_sec_offset
|
||||
debug_info:
|
||||
- Version: 5
|
||||
UnitType: DW_UT_compile
|
||||
AddrSize: 8
|
||||
Entries:
|
||||
- AbbrCode: 0x00000001
|
||||
Values:
|
||||
- Value: 0x0000000000000001
|
||||
- Value: 0x0000000000001000
|
|
@ -0,0 +1,33 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_info Unit Header Chain...
|
||||
# CHECK-NEXT: error: DW_AT_stmt_list offset is beyond .debug_line bounds: 0x00001000
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Attribute: DW_AT_stmt_list
|
||||
Form: DW_FORM_sec_offset
|
||||
debug_info:
|
||||
- Version: 4
|
||||
AddrSize: 8
|
||||
Entries:
|
||||
- AbbrCode: 0x00000001
|
||||
Values:
|
||||
- Value: 0x0000000000000001
|
||||
- Value: 0x0000000000001000
|
|
@ -0,0 +1,29 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -debug-info -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_info Unit Header Chain...
|
||||
# CHECK-NEXT: error: DW_FORM_strp offset beyond .debug_str bounds:
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_no
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
debug_info:
|
||||
- Version: 4
|
||||
AddrSize: 8
|
||||
Entries:
|
||||
- AbbrCode: 0x00000001
|
||||
Values:
|
||||
- Value: 0x0000000000001234
|
|
@ -0,0 +1,60 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_info Unit Header Chain...
|
||||
# CHECK-NEXT: error: DIE address ranges are not contained in its parent's ranges:
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
- main
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
Attributes:
|
||||
- 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
|
||||
- Code: 0x00000003
|
||||
Tag: DW_TAG_lexical_block
|
||||
Children: DW_CHILDREN_no
|
||||
Attributes:
|
||||
- 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: 0x0000000000000001
|
||||
- AbbrCode: 0x00000002
|
||||
Values:
|
||||
- Value: 0x000000000000000D
|
||||
- Value: 0x0000000000001000
|
||||
- Value: 0x0000000000002000
|
||||
- AbbrCode: 0x00000003
|
||||
Values:
|
||||
- Value: 0x0000000000001000
|
||||
- Value: 0x0000000000002001
|
||||
- AbbrCode: 0x00000000
|
||||
- AbbrCode: 0x00000000
|
|
@ -0,0 +1,59 @@
|
|||
# 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
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_info Unit Header Chain...
|
||||
# CHECK-NEXT: error: DIEs have overlapping address ranges
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
- main
|
||||
- foo
|
||||
debug_abbrev:
|
||||
- Table:
|
||||
- Code: 0x00000001
|
||||
Tag: DW_TAG_compile_unit
|
||||
Children: DW_CHILDREN_yes
|
||||
Attributes:
|
||||
- Attribute: DW_AT_name
|
||||
Form: DW_FORM_strp
|
||||
- Code: 0x00000002
|
||||
Tag: DW_TAG_subprogram
|
||||
Children: DW_CHILDREN_no
|
||||
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: 0x0000000000000001
|
||||
- AbbrCode: 0x00000002
|
||||
Values:
|
||||
- Value: 0x000000000000000D
|
||||
- Value: 0x0000000000001000
|
||||
- Value: 0x0000000000002000
|
||||
- AbbrCode: 0x00000002
|
||||
Values:
|
||||
- Value: 0x0000000000000012
|
||||
- Value: 0x0000000000001FFF
|
||||
- Value: 0x0000000000002000
|
||||
- AbbrCode: 0x00000000
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
# RUN: yaml2obj %s -o %t.o
|
||||
# RUN: not llvm-dwarfdump -verify %t.o | FileCheck %s
|
||||
|
||||
# CHECK: Verifying .debug_info Unit Header Chain...
|
||||
# CHECK-NEXT: error: DIEs have overlapping address ranges
|
||||
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
DWARF:
|
||||
debug_str:
|
||||
- ''
|
||||
- /tmp/main.c
|
||||
- main
|
||||
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
|
||||
- Code: 0x00000003
|
||||
Tag: DW_TAG_lexical_block
|
||||
Children: DW_CHILDREN_no
|
||||
Attributes:
|
||||
- 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: 0x0000000000002000
|
||||
- AbbrCode: 0x00000003
|
||||
Values:
|
||||
- Value: 0x0000000000001100
|
||||
- Value: 0x0000000000001300
|
||||
- AbbrCode: 0x00000003
|
||||
Values:
|
||||
- Value: 0x00000000000012FF
|
||||
- Value: 0x0000000000001300
|
||||
- AbbrCode: 0x00000000
|
||||
- AbbrCode: 0x00000000
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue