binutils --dwarf=decodedline: Add display of is_stmt flag
[external/binutils.git] / binutils / testsuite / binutils-all / dw5.W
1 Contents of the .debug_info section:
2
3   Compilation Unit @ offset 0x0:
4    Length:        0x160 \(32-bit\)
5    Version:       5
6    Abbrev Offset: 0x0
7    Pointer Size:  8
8  <0><c>: Abbrev Number: 6 \(DW_TAG_compile_unit\)
9     <d>   DW_AT_producer    : \(indirect string, offset: 0x43\): GNU C11 7.0.1 20170218 \(experimental\) -mtune=generic -march=x86-64 -gdwarf-5 -O2
10     <11>   DW_AT_language    : 29       \(C11\)
11     <12>   DW_AT_name        : \(indirect line string, offset: 0x14\): main.c
12     <16>   DW_AT_comp_dir    : \(indirect line string, offset: 0x0\): 
13     <1a>   DW_AT_ranges      : 0xc
14     <1e>   DW_AT_low_pc      : 0x0
15     <26>   DW_AT_stmt_list   : 0x0
16  <1><2a>: Abbrev Number: 1 \(DW_TAG_base_type\)
17     <2b>   DW_AT_byte_size   : 1
18     <2c>   DW_AT_encoding    : 8        \(unsigned char\)
19     <2d>   DW_AT_name        : \(indirect string, offset: 0x94\): unsigned char
20  <1><31>: Abbrev Number: 1 \(DW_TAG_base_type\)
21     <32>   DW_AT_byte_size   : 2
22     <33>   DW_AT_encoding    : 7        \(unsigned\)
23     <34>   DW_AT_name        : \(indirect string, offset: 0xbc\): short unsigned int
24  <1><38>: Abbrev Number: 1 \(DW_TAG_base_type\)
25     <39>   DW_AT_byte_size   : 4
26     <3a>   DW_AT_encoding    : 7        \(unsigned\)
27     <3b>   DW_AT_name        : \(indirect string, offset: 0x0\): unsigned int
28  <1><3f>: Abbrev Number: 1 \(DW_TAG_base_type\)
29     <40>   DW_AT_byte_size   : 8
30     <41>   DW_AT_encoding    : 7        \(unsigned\)
31     <42>   DW_AT_name        : \(indirect string, offset: 0x2a\): long unsigned int
32  <1><46>: Abbrev Number: 1 \(DW_TAG_base_type\)
33     <47>   DW_AT_byte_size   : 1
34     <48>   DW_AT_encoding    : 6        \(signed char\)
35     <49>   DW_AT_name        : \(indirect string, offset: 0x19\): signed char
36  <1><4d>: Abbrev Number: 1 \(DW_TAG_base_type\)
37     <4e>   DW_AT_byte_size   : 2
38     <4f>   DW_AT_encoding    : 5        \(signed\)
39     <50>   DW_AT_name        : \(indirect string, offset: 0xef\): short int
40  <1><54>: Abbrev Number: 7 \(DW_TAG_base_type\)
41     <55>   DW_AT_byte_size   : 4
42     <56>   DW_AT_encoding    : 5        \(signed\)
43     <57>   DW_AT_name        : int
44  <1><5b>: Abbrev Number: 1 \(DW_TAG_base_type\)
45     <5c>   DW_AT_byte_size   : 8
46     <5d>   DW_AT_encoding    : 5        \(signed\)
47     <5e>   DW_AT_name        : \(indirect string, offset: 0xae\): long int
48  <1><62>: Abbrev Number: 1 \(DW_TAG_base_type\)
49     <63>   DW_AT_byte_size   : 8
50     <64>   DW_AT_encoding    : 7        \(unsigned\)
51     <65>   DW_AT_name        : \(indirect string, offset: 0xff\): sizetype
52  <1><69>: Abbrev Number: 3 \(DW_TAG_pointer_type\)
53     <6a>   DW_AT_byte_size   : 8
54     <6a>   DW_AT_type        : <0x6e>
55  <1><6e>: Abbrev Number: 1 \(DW_TAG_base_type\)
56     <6f>   DW_AT_byte_size   : 1
57     <70>   DW_AT_encoding    : 6        \(signed char\)
58     <71>   DW_AT_name        : \(indirect string, offset: 0xa2\): char
59  <1><75>: Abbrev Number: 8 \(DW_TAG_variable\)
60     <76>   DW_AT_name        : \(indirect string, offset: 0xd9\): __environ
61     <7a>   DW_AT_decl_file   : 2
62     <7b>   DW_AT_decl_line   : 546
63     <7d>   DW_AT_type        : <0x81>
64     <81>   DW_AT_external    : 1
65     <81>   DW_AT_declaration : 1
66  <1><81>: Abbrev Number: 3 \(DW_TAG_pointer_type\)
67     <82>   DW_AT_byte_size   : 8
68     <82>   DW_AT_type        : <0x69>
69  <1><86>: Abbrev Number: 2 \(DW_TAG_variable\)
70     <87>   DW_AT_name        : \(indirect string, offset: 0xe8\): optarg
71     <8b>   DW_AT_decl_file   : 3
72     <8b>   DW_AT_decl_line   : 57
73     <8c>   DW_AT_type        : <0x69>
74     <90>   DW_AT_external    : 1
75     <90>   DW_AT_declaration : 1
76  <1><90>: Abbrev Number: 2 \(DW_TAG_variable\)
77     <91>   DW_AT_name        : \(indirect string, offset: 0xa7\): optind
78     <95>   DW_AT_decl_file   : 3
79     <95>   DW_AT_decl_line   : 71
80     <96>   DW_AT_type        : <0x54>
81     <9a>   DW_AT_external    : 1
82     <9a>   DW_AT_declaration : 1
83  <1><9a>: Abbrev Number: 2 \(DW_TAG_variable\)
84     <9b>   DW_AT_name        : \(indirect string, offset: 0x3c\): opterr
85     <9f>   DW_AT_decl_file   : 3
86     <9f>   DW_AT_decl_line   : 76
87     <a0>   DW_AT_type        : <0x54>
88     <a4>   DW_AT_external    : 1
89     <a4>   DW_AT_declaration : 1
90  <1><a4>: Abbrev Number: 2 \(DW_TAG_variable\)
91     <a5>   DW_AT_name        : \(indirect string, offset: 0xd\): optopt
92     <a9>   DW_AT_decl_file   : 3
93     <a9>   DW_AT_decl_line   : 80
94     <aa>   DW_AT_type        : <0x54>
95     <ae>   DW_AT_external    : 1
96     <ae>   DW_AT_declaration : 1
97  <1><ae>: Abbrev Number: 4 \(DW_TAG_variable\)
98     <af>   DW_AT_name        : \(indirect string, offset: 0x25\): xvar
99     <b3>   DW_AT_decl_file   : 1
100     <b3>   DW_AT_decl_line   : 2
101     <b4>   DW_AT_type        : <0x54>
102     <b8>   DW_AT_external    : 1
103     <b8>   DW_AT_location    : 9 byte block: 3 (0|34) (0|12) 0 0 0 0 (0|12) (0|34)      \(DW_OP_addr: 1234\)
104  <1><c2>: Abbrev Number: 4 \(DW_TAG_variable\)
105     <c3>   DW_AT_name        : \(indirect string, offset: 0xcf\): yvar
106     <c7>   DW_AT_decl_file   : 1
107     <c7>   DW_AT_decl_line   : 3
108     <c8>   DW_AT_type        : <0x54>
109     <cc>   DW_AT_external    : 1
110     <cc>   DW_AT_location    : 9 byte block: 3 (0|34) (0|12) 0 0 0 0 (0|12) (0|34)      \(DW_OP_addr: 1234\)
111  <1><d6>: Abbrev Number: 4 \(DW_TAG_variable\)
112     <d7>   DW_AT_name        : \(indirect string, offset: 0xd4\): pvar
113     <db>   DW_AT_decl_file   : 1
114     <db>   DW_AT_decl_line   : 4
115     <dc>   DW_AT_type        : <0xea>
116     <e0>   DW_AT_external    : 1
117     <e0>   DW_AT_location    : 9 byte block: 3 (0|34) (0|12) 0 0 0 0 (0|12) (0|34)      \(DW_OP_addr: 1234\)
118  <1><ea>: Abbrev Number: 3 \(DW_TAG_pointer_type\)
119     <eb>   DW_AT_byte_size   : 8
120     <eb>   DW_AT_type        : <0x54>
121  <1><ef>: Abbrev Number: 9 \(DW_TAG_subprogram\)
122     <f0>   DW_AT_external    : 1
123     <f0>   DW_AT_name        : \(indirect string, offset: 0x14\): main
124     <f4>   DW_AT_decl_file   : 1
125     <f5>   DW_AT_decl_line   : 6
126     <f6>   DW_AT_prototyped  : 1
127     <f6>   DW_AT_type        : <0x54>
128     <fa>   DW_AT_low_pc      : 0x1234
129     <102>   DW_AT_high_pc     : 0x5678
130     <10a>   DW_AT_frame_base  : 1 byte block: 9c        \(DW_OP_call_frame_cfa\)
131     <10c>   DW_AT_call_all_calls: 1
132     <10c>   DW_AT_sibling     : <0x13e>
133  <2><110>: Abbrev Number: 5 \(DW_TAG_formal_parameter\)
134     <111>   DW_AT_name        : \(indirect string, offset: 0xb7\): argc
135     <115>   DW_AT_decl_file   : 1
136     <115>   DW_AT_decl_line   : 6
137     <115>   DW_AT_type        : <0x54>
138     <119>   DW_AT_location    : 0xc \(location list\)
139  <2><11d>: Abbrev Number: 5 \(DW_TAG_formal_parameter\)
140     <11e>   DW_AT_name        : \(indirect string, offset: 0x108\): argv
141     <122>   DW_AT_decl_file   : 1
142     <122>   DW_AT_decl_line   : 6
143     <122>   DW_AT_type        : <0x81>
144     <126>   DW_AT_location    : 0x23 \(location list\)
145  <2><12a>: Abbrev Number: 10 \(DW_TAG_call_site\)
146     <12b>   DW_AT_call_return_pc: 0x12345
147     <133>   DW_AT_call_origin : <0x157>
148  <3><137>: Abbrev Number: 11 \(DW_TAG_call_site_parameter\)
149     <138>   DW_AT_location    : 1 byte block: 55        \(DW_OP_reg5 \([^()]*\)\)
150     <13a>   DW_AT_call_value  : 1 byte block: 30        \(DW_OP_lit0\)
151  <3><13c>: Abbrev Number: 0
152  <2><13d>: Abbrev Number: 0
153  <1><13e>: Abbrev Number: 12 \(DW_TAG_subprogram\)
154     <13f>   DW_AT_external    : 1
155     <13f>   DW_AT_name        : \(indirect string, offset: 0xe3\): func
156     <143>   DW_AT_decl_file   : 1
157     <144>   DW_AT_decl_line   : 5
158     <145>   DW_AT_prototyped  : 1
159     <145>   DW_AT_low_pc      : 0x1234
160     <14d>   DW_AT_high_pc     : 0x5678
161     <155>   DW_AT_frame_base  : 1 byte block: 9c        \(DW_OP_call_frame_cfa\)
162     <157>   DW_AT_call_all_calls: 1
163  <1><157>: Abbrev Number: 13 \(DW_TAG_subprogram\)
164     <158>   DW_AT_external    : 1
165     <158>   DW_AT_declaration : 1
166     <158>   DW_AT_linkage_name: \(indirect string, offset: 0xf9\): alarm
167     <15c>   DW_AT_name        : \(indirect string, offset: 0xf9\): alarm
168     <160>   DW_AT_decl_file   : 2
169     <161>   DW_AT_decl_line   : 435
170  <1><163>: Abbrev Number: 0
171
172 Contents of the .debug_abbrev section:
173
174   Number TAG \(0x0\)
175    1      DW_TAG_base_type    \[no children\]
176     DW_AT_byte_size    DW_FORM_data1
177     DW_AT_encoding     DW_FORM_data1
178     DW_AT_name         DW_FORM_strp
179     DW_AT value: 0     DW_FORM value: 0
180    2      DW_TAG_variable    \[no children\]
181     DW_AT_name         DW_FORM_strp
182     DW_AT_decl_file    DW_FORM_implicit_const: 3
183     DW_AT_decl_line    DW_FORM_data1
184     DW_AT_type         DW_FORM_ref4
185     DW_AT_external     DW_FORM_flag_present
186     DW_AT_declaration  DW_FORM_flag_present
187     DW_AT value: 0     DW_FORM value: 0
188    3      DW_TAG_pointer_type    \[no children\]
189     DW_AT_byte_size    DW_FORM_implicit_const: 8
190     DW_AT_type         DW_FORM_ref4
191     DW_AT value: 0     DW_FORM value: 0
192    4      DW_TAG_variable    \[no children\]
193     DW_AT_name         DW_FORM_strp
194     DW_AT_decl_file    DW_FORM_implicit_const: 1
195     DW_AT_decl_line    DW_FORM_data1
196     DW_AT_type         DW_FORM_ref4
197     DW_AT_external     DW_FORM_flag_present
198     DW_AT_location     DW_FORM_exprloc
199     DW_AT value: 0     DW_FORM value: 0
200    5      DW_TAG_formal_parameter    \[no children\]
201     DW_AT_name         DW_FORM_strp
202     DW_AT_decl_file    DW_FORM_implicit_const: 1
203     DW_AT_decl_line    DW_FORM_implicit_const: 6
204     DW_AT_type         DW_FORM_ref4
205     DW_AT_location     DW_FORM_sec_offset
206     DW_AT value: 0     DW_FORM value: 0
207    6      DW_TAG_compile_unit    \[has children\]
208     DW_AT_producer     DW_FORM_strp
209     DW_AT_language     DW_FORM_data1
210     DW_AT_name         DW_FORM_line_strp
211     DW_AT_comp_dir     DW_FORM_line_strp
212     DW_AT_ranges       DW_FORM_sec_offset
213     DW_AT_low_pc       DW_FORM_addr
214     DW_AT_stmt_list    DW_FORM_sec_offset
215     DW_AT value: 0     DW_FORM value: 0
216    7      DW_TAG_base_type    \[no children\]
217     DW_AT_byte_size    DW_FORM_data1
218     DW_AT_encoding     DW_FORM_data1
219     DW_AT_name         DW_FORM_string
220     DW_AT value: 0     DW_FORM value: 0
221    8      DW_TAG_variable    \[no children\]
222     DW_AT_name         DW_FORM_strp
223     DW_AT_decl_file    DW_FORM_data1
224     DW_AT_decl_line    DW_FORM_data2
225     DW_AT_type         DW_FORM_ref4
226     DW_AT_external     DW_FORM_flag_present
227     DW_AT_declaration  DW_FORM_flag_present
228     DW_AT value: 0     DW_FORM value: 0
229    9      DW_TAG_subprogram    \[has children\]
230     DW_AT_external     DW_FORM_flag_present
231     DW_AT_name         DW_FORM_strp
232     DW_AT_decl_file    DW_FORM_data1
233     DW_AT_decl_line    DW_FORM_data1
234     DW_AT_prototyped   DW_FORM_flag_present
235     DW_AT_type         DW_FORM_ref4
236     DW_AT_low_pc       DW_FORM_addr
237     DW_AT_high_pc      DW_FORM_data8
238     DW_AT_frame_base   DW_FORM_exprloc
239     DW_AT_call_all_calls DW_FORM_flag_present
240     DW_AT_sibling      DW_FORM_ref4
241     DW_AT value: 0     DW_FORM value: 0
242    10      DW_TAG_call_site    \[has children\]
243     DW_AT_call_return_pc DW_FORM_addr
244     DW_AT_call_origin  DW_FORM_ref4
245     DW_AT value: 0     DW_FORM value: 0
246    11      DW_TAG_call_site_parameter    \[no children\]
247     DW_AT_location     DW_FORM_exprloc
248     DW_AT_call_value   DW_FORM_exprloc
249     DW_AT value: 0     DW_FORM value: 0
250    12      DW_TAG_subprogram    \[no children\]
251     DW_AT_external     DW_FORM_flag_present
252     DW_AT_name         DW_FORM_strp
253     DW_AT_decl_file    DW_FORM_data1
254     DW_AT_decl_line    DW_FORM_data1
255     DW_AT_prototyped   DW_FORM_flag_present
256     DW_AT_low_pc       DW_FORM_addr
257     DW_AT_high_pc      DW_FORM_data8
258     DW_AT_frame_base   DW_FORM_exprloc
259     DW_AT_call_all_calls DW_FORM_flag_present
260     DW_AT value: 0     DW_FORM value: 0
261    13      DW_TAG_subprogram    \[no children\]
262     DW_AT_external     DW_FORM_flag_present
263     DW_AT_declaration  DW_FORM_flag_present
264     DW_AT_linkage_name DW_FORM_strp
265     DW_AT_name         DW_FORM_strp
266     DW_AT_decl_file    DW_FORM_data1
267     DW_AT_decl_line    DW_FORM_data2
268     DW_AT value: 0     DW_FORM value: 0
269 #...
270 Contents of the .debug_loclists section:
271 #...
272     Offset   Begin            End              Expression
273     0000000c 0000000000001234 \(base address\)
274     00000015 0000000000001234 0000000000001236 \(DW_OP_reg5 \([^()]*\)\)
275     0000001a 0000000000001236 0000000000001239 \(DW_OP_entry_value: \(DW_OP_reg5 \([^()]*\)\); DW_OP_stack_value\)
276     00000022 <End of list>
277     00000023 0000000000001234 \(base address\)
278     0000002c 0000000000001234 0000000000001236 \(DW_OP_reg4 \([^()]*\)\)
279     00000031 0000000000001236 0000000000001239 \(DW_OP_entry_value: \(DW_OP_reg4 \([^()]*\)\); DW_OP_stack_value\)
280     00000039 <End of list>
281
282 Contents of the .debug_rnglists section:
283
284     Offset   Begin    End
285     0000000c 0000000000001234 0000000000001236 
286     00000016 0000000000001234 0000000000001239 
287     00000020 <End of list>
288
289 Raw dump of debug contents of section .debug_line:
290
291   Offset:                      0x0
292   Length:                      144
293   DWARF Version:               5
294   Prologue Length:             60
295   Minimum Instruction Length:  1
296   Maximum Ops per Instruction: 1
297   Initial value of 'is_stmt':  1
298   Line Base:                   -10
299   Line Range:                  242
300   Opcode Base:                 13
301
302  Opcodes:
303   Opcode 1 has 0 args
304   Opcode 2 has 1 arg
305   Opcode 3 has 1 arg
306   Opcode 4 has 1 arg
307   Opcode 5 has 1 arg
308   Opcode 6 has 0 args
309   Opcode 7 has 0 args
310   Opcode 8 has 0 args
311   Opcode 9 has 1 arg
312   Opcode 10 has 0 args
313   Opcode 11 has 0 args
314   Opcode 12 has 1 arg
315
316  The Directory Table \(offset 0x22\):
317   Entry Name
318   0     \(indirect line string, offset: 0x0\): 
319   1     \(indirect line string, offset: 0x1\): 
320   2     \(indirect line string, offset: 0x22\): /usr/include
321
322  The File Name Table \(offset 0x34\):
323   Entry Dir     Name
324   0     0       \(indirect line string, offset: 0x14\): main.c
325   1     1       \(indirect line string, offset: 0x1b\): main.c
326   2     2       \(indirect line string, offset: 0xb\): unistd.h
327   3     2       \(indirect line string, offset: 0x2\): getopt.h
328
329  Line Number Statements:
330   \[0x00000048\]  Extended opcode 2: set Address to 0x1234
331   \[0x00000053\]  Special opcode 15: advance Address by 0 to 0x1234 and Line by 5 to 6
332   \[0x00000054\]  Extended opcode 2: set Address to 0x12346
333   \[0x0000005f\]  Copy
334   \[0x00000060\]  Extended opcode 2: set Address to 0x1234
335   \[0x0000006b\]  Extended opcode 1: End of Sequence
336
337   \[0x0000006e\]  Extended opcode 2: set Address to 0x1234
338   \[0x00000079\]  Special opcode 14: advance Address by 0 to 0x1234 and Line by 4 to 5
339   \[0x0000007a\]  Extended opcode 2: set Address to 0x1234
340   \[0x00000085\]  Copy
341   \[0x00000086\]  Extended opcode 2: set Address to 0x1234
342   \[0x00000091\]  Extended opcode 1: End of Sequence
343
344
345 Contents of the .debug_line section:
346
347 CU: ./main.c:
348 File name                            Line number    Starting address    View    Stmt
349 main.c                                         6              0x1234               x
350 main.c                                         6             0x12346               x
351 main.c                                         6              0x1234               x
352
353 main.c                                         5              0x1234               x
354 main.c                                         5              0x1234               x
355 main.c                                         5              0x1234               x
356
357