• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1RUN: llvm-dsymutil -f -o - -oso-prepend-path=%p/.. %p/../Inputs/basic-lto.macho.x86_64 | llvm-dwarfdump - | FileCheck %s
2RUN: llvm-dsymutil -oso-prepend-path=%p/.. -dump-debug-map %p/../Inputs/basic-lto.macho.x86_64 | llvm-dsymutil -f -o - -y - | llvm-dwarfdump - | FileCheck %s
3
4CHECK: file format Mach-O 64-bit x86-64
5
6CHECK: debug_info contents
7
8CHECK:  Compile Unit:
9
10CHECK:  DW_TAG_compile_unit [1] *
11CHECK:    DW_AT_producer [DW_FORM_strp]     ( .debug_str[0x00000001] = "Apple LLVM version 6.0 (clang-600.0.39) (based on LLVM 3.5svn)")
12CHECK:    DW_AT_language [DW_FORM_data2]	(DW_LANG_C99)
13CHECK:    DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000040] = "basic1.c")
14CHECK:    DW_AT_stmt_list [DW_FORM_data4]   (0x00000000)
15CHECK:    DW_AT_comp_dir [DW_FORM_strp]     ( .debug_str[0x00000049] = "/Inputs")
16CHECK:    DW_AT_low_pc [DW_FORM_addr]       (0x0000000100000f40)
17CHECK:    DW_TAG_subprogram [2] *
18CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000051] = "main")
19CHECK:      DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic1.c")
20CHECK:      DW_AT_decl_line [DW_FORM_data1]	(23)
21CHECK:      DW_AT_prototyped [DW_FORM_flag]	(0x01)
22CHECK:      DW_AT_type [DW_FORM_ref4]       (cu + 0x0063 => {0x00000063})
23CHECK:      DW_AT_external [DW_FORM_flag]	(0x01)
24CHECK:      DW_AT_accessibility [DW_FORM_data1]	(DW_ACCESS_public)
25CHECK:      DW_AT_low_pc [DW_FORM_addr]     (0x0000000100000f40)
26CHECK:      DW_AT_high_pc [DW_FORM_addr]     (0x0000000100000f4b)
27CHECK:      DW_AT_frame_base [DW_FORM_block1]	(<0x01> 56 )
28CHECK:      DW_TAG_formal_parameter [3]
29CHECK:        DW_AT_name [DW_FORM_strp]     ( .debug_str[0x00000056] = "argc")
30CHECK:        DW_AT_type [DW_FORM_ref4]     (cu + 0x0063 => {0x00000063})
31CHECK:        DW_AT_location [DW_FORM_block1]	(<0x03> 55 93 04 )
32CHECK:      DW_TAG_formal_parameter [3]
33CHECK:        DW_AT_name [DW_FORM_strp]     ( .debug_str[0x0000005b] = "argv")
34CHECK:        DW_AT_type [DW_FORM_ref4]     (cu + 0x006a => {0x0000006a})
35CHECK:        DW_AT_location [DW_FORM_block1]	(<0x01> 54 )
36CHECK:      NULL
37CHECK:    DW_TAG_base_type [4]
38CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000060] = "int")
39CHECK:      DW_AT_encoding [DW_FORM_data1]	(DW_ATE_signed)
40CHECK:      DW_AT_byte_size [DW_FORM_data1]	(0x04)
41CHECK:    DW_TAG_pointer_type [5]
42CHECK:      DW_AT_type [DW_FORM_ref4]       (cu + 0x006f => {0x0000006f})
43CHECK:    DW_TAG_pointer_type [5]
44CHECK:      DW_AT_type [DW_FORM_ref4]       (cu + 0x0074 => {0x00000074})
45CHECK:    DW_TAG_const_type [6]
46CHECK:      DW_AT_type [DW_FORM_ref4]       (cu + 0x0079 => {0x00000079})
47CHECK:    DW_TAG_base_type [4]
48CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000064] = "char")
49CHECK:      DW_AT_encoding [DW_FORM_data1]	(DW_ATE_signed_char)
50CHECK:      DW_AT_byte_size [DW_FORM_data1]	(0x01)
51CHECK:    NULL
52
53CHECK:  Compile Unit:
54
55CHECK:  DW_TAG_compile_unit [1] *
56CHECK:    DW_AT_producer [DW_FORM_strp]     ( .debug_str[0x00000001] = "Apple LLVM version 6.0 (clang-600.0.39) (based on LLVM 3.5svn)")
57CHECK:    DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000069] = "basic2.c")
58CHECK:    DW_AT_stmt_list [DW_FORM_data4]   (0x0000003e)
59CHECK:    DW_AT_comp_dir [DW_FORM_strp]     ( .debug_str[0x00000049] = "/Inputs")
60CHECK:   DW_AT_low_pc [DW_FORM_addr]       (0x0000000100000f50)
61CHECK:    DW_TAG_variable [7]
62CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000072] = "private_int")
63CHECK:      DW_AT_type [DW_FORM_ref_addr]   (0x0000000000000063)
64CHECK:      DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic2.c")
65CHECK:      DW_AT_location [DW_FORM_block1] (<0x09> 03 08 10 00 00 01 00 00 00 )
66CHECK:    DW_TAG_variable [7]
67CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x0000007e] = "baz")
68CHECK:      DW_AT_type [DW_FORM_ref_addr]   (0x0000000000000063)
69CHECK:      DW_AT_location [DW_FORM_block1] (<0x09> 03 00 10 00 00 01 00 00 00 )
70CHECK:    DW_TAG_subprogram [8] *
71CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000082] = "foo")
72CHECK:      DW_AT_type [DW_FORM_ref_addr]   (0x0000000000000063)
73CHECK:      DW_AT_low_pc [DW_FORM_addr]     (0x0000000100000f50)
74CHECK:      DW_AT_high_pc [DW_FORM_addr]    (0x0000000100000f89)
75CHECK:      DW_AT_frame_base [DW_FORM_block1]	(<0x01> 56 )
76CHECK:      DW_TAG_formal_parameter [9]
77CHECK:        DW_AT_name [DW_FORM_strp]     ( .debug_str[0x00000086] = "arg")
78CHECK:        DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063)
79CHECK:        DW_AT_location [DW_FORM_data4]        (0x00000000)
80CHECK:      DW_TAG_inlined_subroutine [10]
81CHECK:        DW_AT_abstract_origin [DW_FORM_ref4]  (cu + 0x00a7 => {0x00000128} "inc")
82CHECK:        DW_AT_low_pc [DW_FORM_addr]   (0x0000000100000f63)
83CHECK:        DW_AT_high_pc [DW_FORM_addr]  (0x0000000100000f72)
84CHECK:        DW_AT_call_line [DW_FORM_data1]	(20)
85CHECK:      NULL
86CHECK:    DW_TAG_subprogram [11]
87CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x0000008a] = "inc")
88CHECK:      DW_AT_type [DW_FORM_ref_addr]   (0x0000000000000063)
89CHECK:      DW_AT_inline [DW_FORM_data1]	(DW_INL_inlined)
90CHECK:    NULL
91
92CHECK:  Compile Unit:
93
94CHECK:  DW_TAG_compile_unit [1] *
95CHECK:    DW_AT_producer [DW_FORM_strp]     ( .debug_str[0x00000001] = "Apple LLVM version 6.0 (clang-600.0.39) (based on LLVM 3.5svn)")
96CHECK:    DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000008e] = "basic3.c")
97CHECK:    DW_AT_stmt_list [DW_FORM_data4]   (0x0000007e)
98CHECK:    DW_AT_comp_dir [DW_FORM_strp]     ( .debug_str[0x00000049] = "/Inputs")
99CHECK:    DW_AT_low_pc [DW_FORM_addr]       (0x0000000100000f90)
100CHECK:    DW_TAG_variable [12]
101CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x00000097] = "val")
102CHECK:      DW_AT_type [DW_FORM_ref4]       (cu + 0x003c => {0x00000176})
103CHECK:      DW_AT_decl_file [DW_FORM_data1] ("/Inputs{{[/\\]}}basic3.c")
104CHECK:      DW_AT_location [DW_FORM_block1] (<0x09> 03 04 10 00 00 01 00 00 00 )
105CHECK:    DW_TAG_volatile_type [13]
106CHECK:      DW_AT_type [DW_FORM_ref_addr]   (0x0000000000000063)
107CHECK:    DW_TAG_subprogram [8] *
108CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x0000009b] = "bar")
109CHECK:      DW_AT_type [DW_FORM_ref_addr]   (0x0000000000000063)
110CHECK:      DW_AT_low_pc [DW_FORM_addr]     (0x0000000100000f90)
111CHECK:      DW_AT_high_pc [DW_FORM_addr]    (0x0000000100000fb4)
112CHECK:      DW_AT_frame_base [DW_FORM_block1]	(<0x01> 56 )
113CHECK:      DW_TAG_formal_parameter [9]
114CHECK:        DW_AT_name [DW_FORM_strp]     ( .debug_str[0x00000086] = "arg")
115CHECK:        DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063)
116CHECK:        DW_AT_location [DW_FORM_data4]        (0x00000025)
117CHECK:      DW_TAG_lexical_block [14] *
118CHECK:        DW_AT_low_pc [DW_FORM_addr]   (0x0000000100000f94)
119CHECK:        DW_AT_high_pc [DW_FORM_addr]  (0x0000000100000fa7)
120CHECK:        DW_TAG_inlined_subroutine [15]
121CHECK:          DW_AT_abstract_origin [DW_FORM_ref4]        (cu + 0x009a => {0x000001d4} "inc")
122CHECK:          DW_AT_ranges [DW_FORM_data4]        (0x00000000
123CHECK:             [0x0000000100000f94 - 0x0000000100000f9a)
124CHECK:             [0x0000000100000f9f - 0x0000000100000fa7))
125CHECK:        NULL
126CHECK:      NULL
127CHECK:    DW_TAG_subprogram [11]
128CHECK:      DW_AT_name [DW_FORM_strp]       ( .debug_str[0x0000008a] = "inc")
129CHECK:      DW_AT_type [DW_FORM_ref_addr]   (0x0000000000000063)
130CHECK:    NULL
131
132CHECK:.debug_loc contents:
133CHECK-NEXT: 0x00000000: Beginning address offset: 0x0000000000000000
134CHECK-NEXT:                Ending address offset: 0x000000000000000e
135CHECK-NEXT:                 Location description: 55 93 04
136CHECK-NEXT: {{^$}}
137CHECK-NEXT: 0x00000025: Beginning address offset: 0x0000000000000000
138CHECK-NEXT:                Ending address offset: 0x000000000000000f
139CHECK-NEXT:                 Location description: 55 93 04
140CHECK-NEXT: {{^$}}
141CHECK-NEXT:             Beginning address offset: 0x0000000000000019
142CHECK-NEXT:                Ending address offset: 0x000000000000001d
143CHECK-NEXT:                 Location description: 55 93 04
144
145CHECK: .debug_aranges contents:
146CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00
147CHECK-NEXT: [0x0000000100000f40 - 0x0000000100000f4b)
148CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x00000081, addr_size = 0x08, seg_size = 0x00
149CHECK-NEXT: [0x0000000100000f50 - 0x0000000100000f89)
150CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x0000013a, addr_size = 0x08, seg_size = 0x00
151CHECK-NEXT: [0x0000000100000f90 - 0x0000000100000fb4)
152
153
154CHECK: .debug_line contents
155CHECK:                 Dir  Mod Time   File Len   File Name
156CHECK-NEXT:                 ---- ---------- ---------- ---------------------------
157CHECK-NEXT: file_names[  1]    0 0x00000000 0x00000000 basic1.c
158CHECK: Address            Line   Column File   ISA Discriminator Flags
159CHECK-NEXT: ------------------ ------ ------ ------ --- ------------- -------------
160CHECK-NEXT: 0x0000000100000f40     23      0      1   0             0  is_stmt
161CHECK-NEXT: 0x0000000100000f44     24      0      1   0             0  is_stmt prologue_end
162CHECK-NEXT: 0x0000000100000f4b     24      0      1   0             0  is_stmt end_sequence
163
164CHECK:                 Dir  Mod Time   File Len   File Name
165CHECK-NEXT:                 ---- ---------- ---------- ---------------------------
166CHECK-NEXT: file_names[  1]    0 0x00000000 0x00000000 basic2.c
167CHECK: Address            Line   Column File   ISA Discriminator Flags
168CHECK-NEXT: ------------------ ------ ------ ------ --- ------------- -------------
169CHECK-NEXT: 0x0000000100000f50     19      0      1   0             0  is_stmt
170CHECK-NEXT: 0x0000000100000f54     20      0      1   0             0  is_stmt prologue_end
171CHECK-NEXT: 0x0000000100000f63     15      0      1   0             0  is_stmt
172CHECK-NEXT: 0x0000000100000f72     20      0      1   0             0  is_stmt
173CHECK-NEXT: 0x0000000100000f89     20      0      1   0             0  is_stmt end_sequence
174
175CHECK:                 Dir  Mod Time   File Len   File Name
176CHECK-NEXT:                 ---- ---------- ---------- ---------------------------
177CHECK-NEXT: file_names[  1]    0 0x00000000 0x00000000 basic3.c
178CHECK: Address            Line   Column File   ISA Discriminator Flags
179CHECK-NEXT: ------------------ ------ ------ ------ --- ------------- -------------
180CHECK-NEXT: 0x0000000100000f90     16      0      1   0             0  is_stmt
181CHECK-NEXT: 0x0000000100000f94     12      0      1   0             0  is_stmt prologue_end
182CHECK-NEXT: 0x0000000100000f9a     17      0      1   0             0  is_stmt
183CHECK-NEXT: 0x0000000100000f9f     12      0      1   0             0  is_stmt
184CHECK-NEXT: 0x0000000100000fa7     20      0      1   0             0  is_stmt
185CHECK-NEXT: 0x0000000100000fa9     19      0      1   0             0  is_stmt
186CHECK-NEXT: 0x0000000100000fb2     20      0      1   0             0  is_stmt
187CHECK-NEXT: 0x0000000100000fb4     20      0      1   0             0  is_stmt end_sequence
188
189CHECK: .debug_pubnames contents:
190CHECK-NEXT: length = 0x00000017 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000081
191CHECK-NEXT: Offset     Name
192CHECK-NEXT: 0x00000026 "main"
193CHECK-NEXT: length = 0x0000002e version = 0x0002 unit_offset = 0x00000081 unit_size = 0x000000b9
194CHECK-NEXT: Offset     Name
195CHECK-NEXT: 0x00000026 "private_int"
196CHECK-NEXT: 0x0000003f "baz"
197CHECK-NEXT: 0x00000058 "foo"
198CHECK-NEXT: length = 0x0000001e version = 0x0002 unit_offset = 0x0000013a unit_size = 0x000000ac
199CHECK-NEXT: Offset     Name
200CHECK-NEXT: 0x00000026 "val"
201CHECK-NEXT: 0x00000045 "bar"
202
203CHECK: .debug_pubtypes contents:
204CHECK-NEXT: length = 0x0000001f version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000081
205CHECK-NEXT: Offset     Name
206CHECK-NEXT: 0x00000063 "int"
207CHECK-NEXT: 0x00000079 "char"
208