1 # RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t
2 # RUN: llvm-dwarfdump %t | FileCheck %s
4 # CHECK: DW_AT_name ("x0")
5 # CHECK-NEXT: DW_AT_location (0x00000000
6 # CHECK-NEXT: [0x0000000000000000, 0x0000000000000002): DW_OP_reg5 RDI
7 # CHECK-NEXT: [0x0000000000000002, 0x0000000000000003): DW_OP_reg0 RAX)
9 # CHECK: DW_AT_name ("x1")
10 # CHECK-NEXT: DW_AT_location (0xdeadbeef
11 # CHECK-NEXT: error extracting location list: unexpected end of data)
13 # CHECK: DW_AT_name ("x2")
14 # CHECK-NEXT: DW_AT_location (0x00000036
15 # CHECK-NEXT: error extracting location list: unexpected end of data)
26 .size f, .Lfunc_end0-f
28 .section .debug_str,"MS",@progbits,1
30 .asciz "Hand-written DWARF"
42 .section .debug_loc,"",@progbits
44 .quad .Lfunc_begin0-.Lfunc_begin0
45 .quad .Ltmp0-.Lfunc_begin0
46 .short 1 # Loc expr size
47 .byte 85 # super-register DW_OP_reg5
48 .quad .Ltmp0-.Lfunc_begin0
49 .quad .Lfunc_end0-.Lfunc_begin0
50 .short 1 # Loc expr size
51 .byte 80 # super-register DW_OP_reg0
55 .quad .Lfunc_begin0-.Lfunc_begin0
56 .quad .Lfunc_end0-.Lfunc_begin0
57 .short 0xdead # Loc expr size
59 .section .debug_abbrev,"",@progbits
60 .byte 1 # Abbreviation Code
61 .byte 17 # DW_TAG_compile_unit
62 .byte 1 # DW_CHILDREN_yes
63 .byte 37 # DW_AT_producer
64 .byte 14 # DW_FORM_strp
65 .byte 19 # DW_AT_language
66 .byte 5 # DW_FORM_data2
69 .byte 2 # Abbreviation Code
70 .byte 46 # DW_TAG_subprogram
71 .byte 1 # DW_CHILDREN_yes
73 .byte 14 # DW_FORM_strp
76 .byte 3 # Abbreviation Code
77 .byte 5 # DW_TAG_formal_parameter
78 .byte 0 # DW_CHILDREN_no
80 .byte 14 # DW_FORM_strp
81 .byte 2 # DW_AT_location
82 .byte 23 # DW_FORM_sec_offset
85 .byte 4 # Abbreviation Code
86 .byte 36 # DW_TAG_base_type
87 .byte 0 # DW_CHILDREN_no
89 .byte 14 # DW_FORM_strp
90 .byte 62 # DW_AT_encoding
91 .byte 11 # DW_FORM_data1
92 .byte 11 # DW_AT_byte_size
93 .byte 11 # DW_FORM_data1
98 .section .debug_info,"",@progbits
100 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
102 .short 4 # DWARF version number
103 .long .debug_abbrev # Offset Into Abbrev. Section
104 .byte 8 # Address Size (in bytes)
105 .byte 1 # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit
106 .long .Linfo_string0 # DW_AT_producer
107 .short 12 # DW_AT_language
108 .byte 2 # Abbrev [2] 0x2a:0x29 DW_TAG_subprogram
109 .long .Linfo_string3 # DW_AT_name
110 .byte 3 # Abbrev [3] DW_TAG_formal_parameter
111 .long .Lx0 # DW_AT_name
112 .long .Ldebug_loc0 # DW_AT_location
113 .byte 3 # Abbrev [3] DW_TAG_formal_parameter
114 .long .Lx1 # DW_AT_name
115 .long 0xdeadbeef # DW_AT_location
116 .byte 3 # Abbrev [3] DW_TAG_formal_parameter
117 .long .Lx2 # DW_AT_name
118 .long .Ldebug_loc2 # DW_AT_location
119 .byte 0 # End Of Children Mark
120 .byte 0 # End Of Children Mark