| 1 |
# RUN: yaml2obj %s | not llvm-dwarfdump --verify - | FileCheck %s --implicit-check-not=error: |
| 2 |
|
| 3 |
# CHECK: error: DIE has DW_AT_decl_file with invalid encoding{{[[:space:]]}} |
| 4 |
# CHECK-NEXT: 0x0000001a: DW_TAG_subprogram |
| 5 |
# CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000000d] = "main") |
| 6 |
# CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000001000) |
| 7 |
# CHECK-NEXT: DW_AT_high_pc [DW_FORM_addr] (0x0000000000002000) |
| 8 |
# CHECK-NEXT: DW_AT_decl_file [DW_FORM_strp] ( .debug_str[0x00000012] = "") |
| 9 |
# CHECK-NEXT: DW_AT_call_line [DW_FORM_data1] (5){{[[:space:]]}} |
| 10 |
# CHECK-NEXT: error: DIE has DW_AT_call_file with invalid encoding{{[[:space:]]}} |
| 11 |
# CHECK-NEXT: 0x00000034: DW_TAG_inlined_subroutine |
| 12 |
# CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000013] = "inline1") |
| 13 |
# CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000001100) |
| 14 |
# CHECK-NEXT: DW_AT_high_pc [DW_FORM_data4] (0x00000100) |
| 15 |
# CHECK-NEXT: DW_AT_call_file [DW_FORM_strp] ( .debug_str[0x00000012] = "") |
| 16 |
# CHECK-NEXT: DW_AT_call_line [DW_FORM_data1] (10){{[[:space:]]}} |
| 17 |
# CHECK-NEXT: error: DIE has DW_AT_decl_file with invalid encoding{{[[:space:]]}} |
| 18 |
# CHECK-NEXT: 0x0000004a: DW_TAG_subprogram |
| 19 |
# CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000001b] = "foo") |
| 20 |
# CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000002000) |
| 21 |
# CHECK-NEXT: DW_AT_high_pc [DW_FORM_addr] (0x0000000000003000) |
| 22 |
# CHECK-NEXT: DW_AT_decl_file [DW_FORM_sdata] (2) |
| 23 |
# CHECK-NEXT: DW_AT_decl_line [DW_FORM_sdata] (3) |
| 24 |
# CHECK-NEXT: DW_AT_call_file [DW_FORM_sdata] (4) |
| 25 |
# CHECK-NEXT: DW_AT_call_line [DW_FORM_sdata] (5){{[[:space:]]}} |
| 26 |
# CHECK-NEXT: error: DIE has DW_AT_decl_line with invalid encoding{{[[:space:]]}} |
| 27 |
# CHECK-NEXT: 0x0000004a: DW_TAG_subprogram |
| 28 |
# CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000001b] = "foo") |
| 29 |
# CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000002000) |
| 30 |
# CHECK-NEXT: DW_AT_high_pc [DW_FORM_addr] (0x0000000000003000) |
| 31 |
# CHECK-NEXT: DW_AT_decl_file [DW_FORM_sdata] (2) |
| 32 |
# CHECK-NEXT: DW_AT_decl_line [DW_FORM_sdata] (3) |
| 33 |
# CHECK-NEXT: DW_AT_call_file [DW_FORM_sdata] (4) |
| 34 |
# CHECK-NEXT: DW_AT_call_line [DW_FORM_sdata] (5){{[[:space:]]}} |
| 35 |
# CHECK-NEXT: error: DIE has DW_AT_call_file with invalid encoding{{[[:space:]]}} |
| 36 |
# CHECK-NEXT: 0x0000004a: DW_TAG_subprogram |
| 37 |
# CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000001b] = "foo") |
| 38 |
# CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000002000) |
| 39 |
# CHECK-NEXT: DW_AT_high_pc [DW_FORM_addr] (0x0000000000003000) |
| 40 |
# CHECK-NEXT: DW_AT_decl_file [DW_FORM_sdata] (2) |
| 41 |
# CHECK-NEXT: DW_AT_decl_line [DW_FORM_sdata] (3) |
| 42 |
# CHECK-NEXT: DW_AT_call_file [DW_FORM_sdata] (4) |
| 43 |
# CHECK-NEXT: DW_AT_call_line [DW_FORM_sdata] (5){{[[:space:]]}} |
| 44 |
# CHECK-NEXT: error: DIE has DW_AT_call_line with invalid encoding{{[[:space:]]}} |
| 45 |
# CHECK-NEXT: 0x0000004a: DW_TAG_subprogram |
| 46 |
# CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000001b] = "foo") |
| 47 |
# CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] (0x0000000000002000) |
| 48 |
# CHECK-NEXT: DW_AT_high_pc [DW_FORM_addr] (0x0000000000003000) |
| 49 |
# CHECK-NEXT: DW_AT_decl_file [DW_FORM_sdata] (2) |
| 50 |
# CHECK-NEXT: DW_AT_decl_line [DW_FORM_sdata] (3) |
| 51 |
# CHECK-NEXT: DW_AT_call_file [DW_FORM_sdata] (4) |
| 52 |
# CHECK-NEXT: DW_AT_call_line [DW_FORM_sdata] (5){{[[:space:]]}} |
| 53 |
# CHECK-NEXT: Verifying dwo Units... |
| 54 |
# CHECK-NEXT: Verifying .debug_line... |
| 55 |
# CHECK-NEXT: Verifying .debug_str_offsets... |
| 56 |
# CHECK-NEXT: error: Aggregated error counts: |
| 57 |
# CHECK-NEXT: error: Invalid encoding in DW_AT_decl_file occurred 4 time(s). |
| 58 |
# CHECK-NEXT: error: Invalid file index in DW_AT_call_line occurred 1 time(s). |
| 59 |
# CHECK-NEXT: error: Invalid file index in DW_AT_decl_line occurred 1 time(s). |
| 60 |
--- !ELF |
| 61 |
FileHeader: |
| 62 |
Class: ELFCLASS64 |
| 63 |
Data: ELFDATA2LSB |
| 64 |
Type: ET_EXEC |
| 65 |
Machine: EM_X86_64 |
| 66 |
DWARF: |
| 67 |
debug_str: |
| 68 |
- '' |
| 69 |
- '/tmp/main.c' |
| 70 |
- main |
| 71 |
- '' |
| 72 |
- inline1 |
| 73 |
- foo |
| 74 |
debug_abbrev: |
| 75 |
- Table: |
| 76 |
- Code: 0x0000000000000001 |
| 77 |
Tag: DW_TAG_compile_unit |
| 78 |
Children: DW_CHILDREN_yes |
| 79 |
Attributes: |
| 80 |
- Attribute: DW_AT_name |
| 81 |
Form: DW_FORM_strp |
| 82 |
- Attribute: DW_AT_language |
| 83 |
Form: DW_FORM_data2 |
| 84 |
- Attribute: DW_AT_low_pc |
| 85 |
Form: DW_FORM_addr |
| 86 |
- Code: 0x0000000000000002 |
| 87 |
Tag: DW_TAG_subprogram |
| 88 |
Children: DW_CHILDREN_yes |
| 89 |
Attributes: |
| 90 |
- Attribute: DW_AT_name |
| 91 |
Form: DW_FORM_strp |
| 92 |
- Attribute: DW_AT_low_pc |
| 93 |
Form: DW_FORM_addr |
| 94 |
- Attribute: DW_AT_high_pc |
| 95 |
Form: DW_FORM_addr |
| 96 |
- Attribute: DW_AT_decl_file |
| 97 |
Form: DW_FORM_strp |
| 98 |
- Attribute: DW_AT_call_line |
| 99 |
Form: DW_FORM_data1 |
| 100 |
- Code: 0x0000000000000003 |
| 101 |
Tag: DW_TAG_inlined_subroutine |
| 102 |
Children: DW_CHILDREN_no |
| 103 |
Attributes: |
| 104 |
- Attribute: DW_AT_name |
| 105 |
Form: DW_FORM_strp |
| 106 |
- Attribute: DW_AT_low_pc |
| 107 |
Form: DW_FORM_addr |
| 108 |
- Attribute: DW_AT_high_pc |
| 109 |
Form: DW_FORM_data4 |
| 110 |
- Attribute: DW_AT_call_file |
| 111 |
Form: DW_FORM_strp |
| 112 |
- Attribute: DW_AT_call_line |
| 113 |
Form: DW_FORM_data1 |
| 114 |
- Code: 0x0000000000000004 |
| 115 |
Tag: DW_TAG_subprogram |
| 116 |
Children: DW_CHILDREN_no |
| 117 |
Attributes: |
| 118 |
- Attribute: DW_AT_name |
| 119 |
Form: DW_FORM_strp |
| 120 |
- Attribute: DW_AT_low_pc |
| 121 |
Form: DW_FORM_addr |
| 122 |
- Attribute: DW_AT_high_pc |
| 123 |
Form: DW_FORM_addr |
| 124 |
- Attribute: DW_AT_decl_file |
| 125 |
Form: DW_FORM_sdata |
| 126 |
- Attribute: DW_AT_decl_line |
| 127 |
Form: DW_FORM_sdata |
| 128 |
- Attribute: DW_AT_call_file |
| 129 |
Form: DW_FORM_sdata |
| 130 |
- Attribute: DW_AT_call_line |
| 131 |
Form: DW_FORM_sdata |
| 132 |
debug_info: |
| 133 |
- Length: 0x0000000000000061 |
| 134 |
Version: 4 |
| 135 |
AbbrOffset: 0x0000000000000000 |
| 136 |
AddrSize: 8 |
| 137 |
Entries: |
| 138 |
- AbbrCode: 0x00000001 |
| 139 |
Values: |
| 140 |
- Value: 0x0000000000000001 |
| 141 |
- Value: 0x0000000000000002 |
| 142 |
- Value: 0x0000000000000000 |
| 143 |
- AbbrCode: 0x00000002 |
| 144 |
Values: |
| 145 |
- Value: 0x000000000000000D |
| 146 |
- Value: 0x0000000000001000 |
| 147 |
- Value: 0x0000000000002000 |
| 148 |
- Value: 0x0000000000000012 |
| 149 |
- Value: 0x0000000000000005 |
| 150 |
- AbbrCode: 0x00000003 |
| 151 |
Values: |
| 152 |
- Value: 0x0000000000000013 |
| 153 |
- Value: 0x0000000000001100 |
| 154 |
- Value: 0x0000000000000100 |
| 155 |
- Value: 0x0000000000000012 |
| 156 |
- Value: 0x000000000000000A |
| 157 |
- AbbrCode: 0x00000004 |
| 158 |
Values: |
| 159 |
- Value: 0x000000000000001B |
| 160 |
- Value: 0x0000000000002000 |
| 161 |
- Value: 0x0000000000003000 |
| 162 |
- Value: 0x0000000000000002 |
| 163 |
- Value: 0x0000000000000003 |
| 164 |
- Value: 0x0000000000000004 |
| 165 |
- Value: 0x0000000000000005 |
| 166 |
- AbbrCode: 0x00000000 |
| 167 |
Values: [] |
| 168 |
- AbbrCode: 0x00000000 |
| 169 |
Values: [] |
| 170 |
... |