|
64 | 64 | .long .Lunit_short_prologue_end - .Lunit_short_prologue_start # unit length
|
65 | 65 | .Lunit_short_prologue_start:
|
66 | 66 | .short 4 # version
|
67 |
| -.long .Lprologue_short_prologue_end-.Lprologue_short_prologue_start - 2 # Length of Prologue |
| 67 | +.long .Lprologue_short_prologue_end-.Lprologue_short_prologue_start # Length of Prologue |
68 | 68 | .Lprologue_short_prologue_start:
|
69 | 69 | .byte 1 # Minimum Instruction Length
|
70 | 70 | .byte 1 # Maximum Operations per Instruction
|
|
79 | 79 | .asciz "file1" # File table
|
80 | 80 | .byte 0, 0, 0
|
81 | 81 | .asciz "file2"
|
82 |
| -.byte 1, 2, 3 |
83 |
| -.byte 0 |
| 82 | +.byte 1, 2 |
84 | 83 | .Lprologue_short_prologue_end:
|
| 84 | +.byte 6 # Read as part of the prologue, |
| 85 | + # then later again as DW_LNS_negate_stmt. |
| 86 | +# FIXME: There should be an additional 0 byte here, but the file name parsing |
| 87 | +# code does not recognise a missing null terminator. |
| 88 | +# Header end |
85 | 89 | .byte 0, 9, 2 # DW_LNE_set_address
|
86 | 90 | .quad 0x1122334455667788
|
87 | 91 | .byte 0, 1, 1 # DW_LNE_end_sequence
|
|
91 | 95 | .long .Lunit_long_prologue_end - .Lunit_long_prologue_start # unit length
|
92 | 96 | .Lunit_long_prologue_start:
|
93 | 97 | .short 4 # version
|
94 |
| -.long .Lprologue_long_prologue_end-.Lprologue_long_prologue_start + 1 # Length of Prologue |
| 98 | +.long .Lprologue_long_prologue_end-.Lprologue_long_prologue_start # Length of Prologue |
95 | 99 | .Lprologue_long_prologue_start:
|
96 | 100 | .byte 1 # Minimum Instruction Length
|
97 | 101 | .byte 1 # Maximum Operations per Instruction
|
|
108 | 112 | .asciz "file2"
|
109 | 113 | .byte 1, 2, 3
|
110 | 114 | .byte 0
|
| 115 | +# Skipped byte (treated as part of prologue). |
| 116 | +.byte 6 |
111 | 117 | .Lprologue_long_prologue_end:
|
112 | 118 | .byte 0, 9, 2 # DW_LNE_set_address
|
113 | 119 | .quad 0x1111222233334444
|
|
180 | 186 | .short 5 # DWARF version number
|
181 | 187 | .byte 8 # Address Size
|
182 | 188 | .byte 0 # Segment Selector Size
|
183 |
| -.long 15 # Length of Prologue (invalid) |
| 189 | +.long .Linvalid_description_header_end0 - .Linvalid_description_params0 # Length of Prologue (invalid) |
184 | 190 | .Linvalid_description_params0:
|
185 | 191 | .byte 1 # Minimum Instruction Length
|
186 | 192 | .byte 1 # Maximum Operations per Instruction
|
187 | 193 | .byte 1 # Default is_stmt
|
188 | 194 | .byte -5 # Line Base
|
189 | 195 | .byte 14 # Line Range
|
190 | 196 | .byte 13 # Opcode Base
|
191 |
| -.byte 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 # Standard Opcode Lengths |
| 197 | +.byte 0, 1, 1, 1, 1, 0, 0, 0, 1, 0 # Standard Opcode Lengths |
| 198 | +.Linvalid_description_header_end0: |
| 199 | +# The bytes from here onwards will also be read as part of the main body. |
| 200 | + # --- Prologue interpretation --- | --- Main body interpretation --- |
| 201 | +.byte 0, 1 # More standard opcodes | First part of DW_LNE_end_sequence |
192 | 202 | # Directory table format
|
193 |
| -.byte 1 # One element per directory entry |
194 |
| -.byte 1 # DW_LNCT_path |
195 |
| -.byte 0x08 # DW_FORM_string |
| 203 | +.byte 1 # One element per directory entry | End of DW_LNE_end_sequence |
| 204 | +.byte 1 # DW_LNCT_path | DW_LNS_copy |
| 205 | +.byte 0x08 # DW_FORM_string | DW_LNS_const_add_pc |
196 | 206 | # Directory table entries
|
197 |
| -.byte 1 # 1 directory |
198 |
| -.asciz "/tmp" |
| 207 | +.byte 1 # 1 directory | DW_LNS_copy |
| 208 | +.asciz "/tmp" # Directory name | four special opcodes + start of DW_LNE_end_sequence |
199 | 209 | # File table format
|
200 |
| -.byte 2 # 2 elements per file entry |
201 |
| -.byte 1 # DW_LNCT_path |
202 |
| -.byte 0x08 # DW_FORM_string |
203 |
| -.byte 2 # DW_LNCT_directory_index |
204 |
| -.byte 0x0b # DW_FORM_data1 |
| 210 | +.byte 1 # 1 element per file entry | DW_LNE_end_sequence length |
| 211 | +.byte 1 # DW_LNCT_path | DW_LNE_end_sequence opcode |
| 212 | +.byte 0x08 # DW_FORM_string | DW_LNS_const_add_pc |
205 | 213 | # File table entries
|
206 |
| -.byte 1 # 1 file |
207 |
| -.asciz "a.c" |
208 |
| -.byte 1 |
209 |
| -.Linvalid_description_header_end0: |
210 |
| -.byte 0, 9, 2 # DW_LNE_set_address |
| 214 | +.byte 1 # 1 file | DW_LNS_copy |
| 215 | +.asciz "xyz" # File name | three special opcodes + start of DW_LNE_set_address |
| 216 | +# Header end |
| 217 | +.byte 9, 2 # Remainder of DW_LNE_set_address |
211 | 218 | .quad 0xbabb1ebabb1e
|
212 | 219 | .byte 0, 1, 1 # DW_LNE_end_sequence
|
213 | 220 | .Linvalid_description_end0:
|
|
218 | 225 | .short 5 # DWARF version number
|
219 | 226 | .byte 8 # Address Size
|
220 | 227 | .byte 0 # Segment Selector Size
|
221 |
| -.long .Linvalid_file_header_end0-.Linvalid_file_params0-7 # Length of Prologue (invalid) |
| 228 | +.long .Linvalid_file_header_end0 - .Linvalid_file_params0 # Length of Prologue (invalid) |
222 | 229 | .Linvalid_file_params0:
|
223 | 230 | .byte 1 # Minimum Instruction Length
|
224 | 231 | .byte 1 # Maximum Operations per Instruction
|
|
239 | 246 | .byte 1 # DW_LNCT_path
|
240 | 247 | .byte 0x08 # DW_FORM_string
|
241 | 248 | .byte 2 # DW_LNCT_directory_index
|
242 |
| -.byte 0x0b # DW_FORM_data1 |
243 |
| -# File table entries |
244 |
| -.byte 1 # 1 file |
245 |
| -.asciz "a.c" |
246 |
| -.byte 1 |
247 | 249 | .Linvalid_file_header_end0:
|
| 250 | +# The bytes from here onwards will also be read as part of the main body. |
| 251 | + # --- Prologue interpretation --- | --- Main body interpretation --- |
| 252 | +.byte 0x0b # DW_FORM_data1 | DW_LNS_set_epilogue_begin |
| 253 | +# File table entries |
| 254 | +.byte 1 # 1 file | DW_LNS_copy |
| 255 | +.asciz "xyz" # File name | 3 special opcodes + start of DW_LNE_end_sequence |
| 256 | +.byte 1 # Dir index | DW_LNE_end_sequence length |
| 257 | +# Header end |
| 258 | +.byte 1 # DW_LNE_end_sequence opcode |
248 | 259 | .byte 0, 9, 2 # DW_LNE_set_address
|
249 | 260 | .quad 0xab4acadab4a
|
250 | 261 | .byte 0, 1, 1 # DW_LNE_end_sequence
|
|
256 | 267 | .short 5 # DWARF version number
|
257 | 268 | .byte 8 # Address Size
|
258 | 269 | .byte 0 # Segment Selector Size
|
259 |
| -.long .Linvalid_dir_header_end0-.Linvalid_dir_params0-16 # Length of Prologue (invalid) |
| 270 | +.long .Linvalid_dir_header_end0 - .Linvalid_dir_params0 # Length of Prologue (invalid) |
260 | 271 | .Linvalid_dir_params0:
|
261 | 272 | .byte 1 # Minimum Instruction Length
|
262 | 273 | .byte 1 # Maximum Operations per Instruction
|
|
271 | 282 | .byte 0x08 # DW_FORM_string
|
272 | 283 | # Directory table entries
|
273 | 284 | .byte 1 # 1 directory
|
274 |
| -.asciz "/tmp" |
| 285 | +.Linvalid_dir_header_end0: |
| 286 | +# The bytes from here onwards will also be read as part of the main body. |
| 287 | + # --- Prologue interpretation --- | --- Main body interpretation --- |
| 288 | +.asciz "/tmp" # Directory name | 4 special opcodes + start of DW_LNE_end_sequence |
275 | 289 | # File table format
|
276 |
| -.byte 2 # 2 elements per file entry |
277 |
| -.byte 1 # DW_LNCT_path |
278 |
| -.byte 0x08 # DW_FORM_string |
279 |
| -.byte 2 # DW_LNCT_directory_index |
280 |
| -.byte 0x0b # DW_FORM_data1 |
| 290 | +.byte 1 # 1 element per file entry | DW_LNE_end_sequence length |
| 291 | +.byte 1 # DW_LNCT_path | DW_LNE_end_sequence length opcode |
| 292 | +.byte 0x08 # DW_FORM_string | DW_LNS_const_add_pc |
281 | 293 | # File table entries
|
282 |
| -.byte 1 # 1 file |
283 |
| -.asciz "a.c" |
284 |
| -.byte 1 |
285 |
| -.Linvalid_dir_header_end0: |
286 |
| -.byte 0, 9, 2 # DW_LNE_set_address |
| 294 | +.byte 1 # 1 file | DW_LNS_copy |
| 295 | +.asciz "xyz" # File name | start of DW_LNE_set_address |
| 296 | +# Header end |
| 297 | +.byte 9, 2 # DW_LNE_set_address length + opcode |
287 | 298 | .quad 0x4444333322221111
|
288 | 299 | .byte 0, 1, 1 # DW_LNE_end_sequence
|
289 | 300 | .Linvalid_dir_end0:
|
|
323 | 334 | .asciz "a.c"
|
324 | 335 | .byte 0
|
325 | 336 | # Data to show that the rest of the prologue is skipped.
|
326 |
| -.byte 6 |
| 337 | +.byte 1 |
327 | 338 | .Linvalid_md5_header_end0:
|
328 | 339 | .byte 0, 9, 2 # DW_LNE_set_address
|
329 | 340 | .quad 0x1234123412341234
|
|
337 | 348 | .short 5 # DWARF version number
|
338 | 349 | .byte 8 # Address Size
|
339 | 350 | .byte 0 # Segment Selector Size
|
340 |
| -.long .Linvalid_md5_header_end1-.Linvalid_md5_params1 - 10 # Length of Prologue |
| 351 | +.long .Linvalid_md5_header_end1 - .Linvalid_md5_params1 # Length of Prologue |
341 | 352 | .Linvalid_md5_params1:
|
342 | 353 | .byte 1 # Minimum Instruction Length
|
343 | 354 | .byte 1 # Maximum Operations per Instruction
|
|
354 | 365 | .byte 1 # 1 directory
|
355 | 366 | .asciz "/tmp"
|
356 | 367 | # File table format
|
357 |
| -.byte 3 # 2 elements per file entry |
| 368 | +.byte 2 # 2 elements per file entry |
358 | 369 | .byte 1 # DW_LNCT_path
|
359 | 370 | .byte 0x08 # DW_FORM_string
|
360 | 371 | .byte 5 # DW_LNCT_MD5
|
361 |
| -.byte 0x0b # DW_FORM_data1 |
362 |
| -.byte 2 # DW_LNCT_directory_index |
363 |
| -.byte 0x0b # DW_FORM_data1 |
364 |
| -# File table entries |
365 |
| -.byte 1 # 1 file |
366 |
| -.asciz "a.c" |
367 |
| -.byte 6 # This byte will be consumed when reading the MD5 value. |
368 |
| -.byte 0xb # This byte will not be read as part of the prologue. |
369 | 372 | .Linvalid_md5_header_end1:
|
370 |
| -.byte 0, 9, 2 # DW_LNE_set_address |
| 373 | +# The bytes from here onwards will also be read as part of the main body. |
| 374 | + # --- Prologue interpretation --- | --- Main body interpretation --- |
| 375 | +.byte 0x0b # DW_FORM_data1 | DW_LNS_set_epilogue_begin |
| 376 | +# File table entries |
| 377 | +.byte 1 # 1 file | DW_LNS_copy |
| 378 | +.asciz "xyz" # File name | 3 special opcodes + DW_LNE_set_address start |
| 379 | +.byte 9 # MD5 hash value | DW_LNE_set_address length |
| 380 | +# Header end |
| 381 | +.byte 2 # DW_LNE_set_address opcode |
371 | 382 | .quad 0x4321432143214321
|
372 | 383 | .byte 0, 1, 1 # DW_LNE_end_sequence
|
373 | 384 | .Linvalid_md5_end1:
|
|
0 commit comments