|
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 # Length of Prologue |
| 67 | +.long .Lprologue_short_prologue_end-.Lprologue_short_prologue_start - 2 # 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 |
| 82 | +.byte 1, 2, 3 |
| 83 | +.byte 0 |
83 | 84 | .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 |
89 | 85 | .byte 0, 9, 2 # DW_LNE_set_address
|
90 | 86 | .quad 0x1122334455667788
|
91 | 87 | .byte 0, 1, 1 # DW_LNE_end_sequence
|
|
95 | 91 | .long .Lunit_long_prologue_end - .Lunit_long_prologue_start # unit length
|
96 | 92 | .Lunit_long_prologue_start:
|
97 | 93 | .short 4 # version
|
98 |
| -.long .Lprologue_long_prologue_end-.Lprologue_long_prologue_start # Length of Prologue |
| 94 | +.long .Lprologue_long_prologue_end-.Lprologue_long_prologue_start + 1 # Length of Prologue |
99 | 95 | .Lprologue_long_prologue_start:
|
100 | 96 | .byte 1 # Minimum Instruction Length
|
101 | 97 | .byte 1 # Maximum Operations per Instruction
|
|
112 | 108 | .asciz "file2"
|
113 | 109 | .byte 1, 2, 3
|
114 | 110 | .byte 0
|
115 |
| -# Skipped byte (treated as part of prologue). |
116 |
| -.byte 6 |
117 | 111 | .Lprologue_long_prologue_end:
|
118 | 112 | .byte 0, 9, 2 # DW_LNE_set_address
|
119 | 113 | .quad 0x1111222233334444
|
|
186 | 180 | .short 5 # DWARF version number
|
187 | 181 | .byte 8 # Address Size
|
188 | 182 | .byte 0 # Segment Selector Size
|
189 |
| -.long .Linvalid_description_header_end0 - .Linvalid_description_params0 # Length of Prologue (invalid) |
| 183 | +.long 15 # Length of Prologue (invalid) |
190 | 184 | .Linvalid_description_params0:
|
191 | 185 | .byte 1 # Minimum Instruction Length
|
192 | 186 | .byte 1 # Maximum Operations per Instruction
|
193 | 187 | .byte 1 # Default is_stmt
|
194 | 188 | .byte -5 # Line Base
|
195 | 189 | .byte 14 # Line Range
|
196 | 190 | .byte 13 # Opcode Base
|
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 |
| 191 | +.byte 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 # Standard Opcode Lengths |
202 | 192 | # Directory table format
|
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 |
| 193 | +.byte 1 # One element per directory entry |
| 194 | +.byte 1 # DW_LNCT_path |
| 195 | +.byte 0x08 # DW_FORM_string |
206 | 196 | # Directory table entries
|
207 |
| -.byte 1 # 1 directory | DW_LNS_copy |
208 |
| -.asciz "/tmp" # Directory name | four special opcodes + start of DW_LNE_end_sequence |
| 197 | +.byte 1 # 1 directory |
| 198 | +.asciz "/tmp" |
209 | 199 | # File table format
|
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 |
| 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 |
213 | 205 | # File table entries
|
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 |
| 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 |
218 | 211 | .quad 0xbabb1ebabb1e
|
219 | 212 | .byte 0, 1, 1 # DW_LNE_end_sequence
|
220 | 213 | .Linvalid_description_end0:
|
|
225 | 218 | .short 5 # DWARF version number
|
226 | 219 | .byte 8 # Address Size
|
227 | 220 | .byte 0 # Segment Selector Size
|
228 |
| -.long .Linvalid_file_header_end0 - .Linvalid_file_params0 # Length of Prologue (invalid) |
| 221 | +.long .Linvalid_file_header_end0-.Linvalid_file_params0-7 # Length of Prologue (invalid) |
229 | 222 | .Linvalid_file_params0:
|
230 | 223 | .byte 1 # Minimum Instruction Length
|
231 | 224 | .byte 1 # Maximum Operations per Instruction
|
|
246 | 239 | .byte 1 # DW_LNCT_path
|
247 | 240 | .byte 0x08 # DW_FORM_string
|
248 | 241 | .byte 2 # DW_LNCT_directory_index
|
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 |
| 242 | +.byte 0x0b # DW_FORM_data1 |
253 | 243 | # 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 |
| 244 | +.byte 1 # 1 file |
| 245 | +.asciz "a.c" |
| 246 | +.byte 1 |
| 247 | +.Linvalid_file_header_end0: |
259 | 248 | .byte 0, 9, 2 # DW_LNE_set_address
|
260 | 249 | .quad 0xab4acadab4a
|
261 | 250 | .byte 0, 1, 1 # DW_LNE_end_sequence
|
|
267 | 256 | .short 5 # DWARF version number
|
268 | 257 | .byte 8 # Address Size
|
269 | 258 | .byte 0 # Segment Selector Size
|
270 |
| -.long .Linvalid_dir_header_end0 - .Linvalid_dir_params0 # Length of Prologue (invalid) |
| 259 | +.long .Linvalid_dir_header_end0-.Linvalid_dir_params0-16 # Length of Prologue (invalid) |
271 | 260 | .Linvalid_dir_params0:
|
272 | 261 | .byte 1 # Minimum Instruction Length
|
273 | 262 | .byte 1 # Maximum Operations per Instruction
|
|
282 | 271 | .byte 0x08 # DW_FORM_string
|
283 | 272 | # Directory table entries
|
284 | 273 | .byte 1 # 1 directory
|
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 |
| 274 | +.asciz "/tmp" |
289 | 275 | # File table format
|
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 |
| 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 |
293 | 281 | # File table entries
|
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 |
| 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 |
298 | 287 | .quad 0x4444333322221111
|
299 | 288 | .byte 0, 1, 1 # DW_LNE_end_sequence
|
300 | 289 | .Linvalid_dir_end0:
|
|
334 | 323 | .asciz "a.c"
|
335 | 324 | .byte 0
|
336 | 325 | # Data to show that the rest of the prologue is skipped.
|
337 |
| -.byte 1 |
| 326 | +.byte 6 |
338 | 327 | .Linvalid_md5_header_end0:
|
339 | 328 | .byte 0, 9, 2 # DW_LNE_set_address
|
340 | 329 | .quad 0x1234123412341234
|
|
348 | 337 | .short 5 # DWARF version number
|
349 | 338 | .byte 8 # Address Size
|
350 | 339 | .byte 0 # Segment Selector Size
|
351 |
| -.long .Linvalid_md5_header_end1 - .Linvalid_md5_params1 # Length of Prologue |
| 340 | +.long .Linvalid_md5_header_end1-.Linvalid_md5_params1 - 10 # Length of Prologue |
352 | 341 | .Linvalid_md5_params1:
|
353 | 342 | .byte 1 # Minimum Instruction Length
|
354 | 343 | .byte 1 # Maximum Operations per Instruction
|
|
365 | 354 | .byte 1 # 1 directory
|
366 | 355 | .asciz "/tmp"
|
367 | 356 | # File table format
|
368 |
| -.byte 2 # 2 elements per file entry |
| 357 | +.byte 3 # 2 elements per file entry |
369 | 358 | .byte 1 # DW_LNCT_path
|
370 | 359 | .byte 0x08 # DW_FORM_string
|
371 | 360 | .byte 5 # DW_LNCT_MD5
|
372 |
| -.Linvalid_md5_header_end1: |
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 |
| 361 | +.byte 0x0b # DW_FORM_data1 |
| 362 | +.byte 2 # DW_LNCT_directory_index |
| 363 | +.byte 0x0b # DW_FORM_data1 |
376 | 364 | # 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 |
| 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 | +.Linvalid_md5_header_end1: |
| 370 | +.byte 0, 9, 2 # DW_LNE_set_address |
382 | 371 | .quad 0x4321432143214321
|
383 | 372 | .byte 0, 1, 1 # DW_LNE_end_sequence
|
384 | 373 | .Linvalid_md5_end1:
|
|
0 commit comments