1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
## Test that DWARFv5 DW_FORM_line_strp and corresponding .debug_line_str
## table are correctly recognized and copied into the result.
# RUN: yaml2obj %s -o %t.o
# RUN: llvm-dwarfutil %t.o %t1
# RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK
# RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s
#
# RUN: llvm-dwarfutil --no-garbage-collection %t.o %t1
# RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK
# RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s
#
# RUN: llvm-dwarfutil --no-garbage-collection --build-accelerator=DWARF %t.o %t1
# RUN: llvm-dwarfdump -verify %t1 | FileCheck %s --check-prefix VERIFY-CHECK
# RUN: llvm-dwarfdump -a --verbose %t1 | FileCheck %s
#VERIFY-CHECK: No errors.
#CHECK: .debug_info
#CHECK: DW_TAG_compile_unit
#CHECK: DW_TAG_subprogram
#CHECK: DW_AT_name [DW_FORM_line_strp] ( .debug_line_str[0x00000000] = "foo1")
#CHECK: .debug_line
#CHECK: include_directories[ 0] = .debug_line_str[0x00000000] = "foo1"
#CHECK: include_directories[ 1] = .debug_line_str[0x00000000] = "foo1"
#CHECK: file_names[ 0]:
#CHECK: name: .debug_line_str[0x00000000] = "foo1"
#CHECK: file_names[ 1]:
#CHECK: name: .debug_line_str[0x00000000] = "foo1"
#CHECK: .debug_line_str
#CHECK: "foo1"
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Address: 0x1130
Size: 0x60
- Name: .debug_line_str
Type: SHT_PROGBITS
Flags: [ ]
Content: "666f6f3100"
- Name: .debug_line
Type: SHT_PROGBITS
Flags: [ ]
Content: "2a00000005000801220000000102030405050102030401011f02000000000000000001011f020000000000000000"
DWARF:
debug_abbrev:
- Table:
- Tag: DW_TAG_compile_unit
Children: DW_CHILDREN_yes
Attributes:
- Attribute: DW_AT_producer
Form: DW_FORM_string
- Attribute: DW_AT_language
Form: DW_FORM_data2
- Attribute: DW_AT_name
Form: DW_FORM_string
- Attribute: DW_AT_low_pc
Form: DW_FORM_addrx
- Attribute: DW_AT_high_pc
Form: DW_FORM_data8
- Attribute: DW_AT_addr_base
Form: DW_FORM_sec_offset
- Attribute: DW_AT_stmt_list
Form: DW_FORM_sec_offset
- Tag: DW_TAG_subprogram
Children: DW_CHILDREN_yes
Attributes:
- Attribute: DW_AT_name
Form: DW_FORM_line_strp
- Attribute: DW_AT_low_pc
Form: DW_FORM_addrx
- Attribute: DW_AT_high_pc
Form: DW_FORM_data8
- Attribute: DW_AT_type
Form: DW_FORM_ref4
- Tag: DW_TAG_base_type
Children: DW_CHILDREN_no
Attributes:
- Attribute: DW_AT_name
Form: DW_FORM_string
- Tag: DW_TAG_variable
Children: DW_CHILDREN_no
Attributes:
- Attribute: DW_AT_name
Form: DW_FORM_string
- Attribute: DW_AT_const_value
Form: DW_FORM_implicit_const
Value: 33
- Attribute: DW_AT_type
Form: DW_FORM_ref4
debug_info:
- Version: 5
UnitType: DW_UT_compile
Entries:
- AbbrCode: 1
Values:
- CStr: by_hand
- Value: 0x04
- CStr: CU1
- Value: 0x0
- Value: 0x10
- Value: 0x8
- Value: 0x0
- AbbrCode: 2
Values:
- Value: 0x0
- Value: 0x0
- Value: 0x10
- Value: 0x3f
- AbbrCode: 0
- AbbrCode: 3
Values:
- CStr: int
- AbbrCode: 0
debug_addr:
- Version: 5
AddressSize: 0x08
Entries:
- Address: 0x1130
...
|