diff options
| author | Kyle Huey <khuey@kylehuey.com> | 2024-08-03 21:04:19 -0700 |
|---|---|---|
| committer | Kyle Huey <khuey@kylehuey.com> | 2024-08-03 21:18:52 -0700 |
| commit | 78caecf8f30dbdbfcb6e0fda25edc72b3e4d04a5 (patch) | |
| tree | e0978cdd2075bb099d9272dce51d7fc89b69d091 /tests/codegen/patchable-function-entry | |
| parent | a6043039ad3aef48e08d72a3e32545accdee427a (diff) | |
| download | rust-78caecf8f30dbdbfcb6e0fda25edc72b3e4d04a5.tar.gz rust-78caecf8f30dbdbfcb6e0fda25edc72b3e4d04a5.zip | |
Special case DUMMY_SP to emit line 0/column 0 locations on DWARF platforms.
Line 0 has a special meaning in DWARF. From the version 5 spec:
The compiler may emit the value 0 in cases
where an instruction cannot be attributed to any
source line.
DUMMY_SP spans cannot be attributed to any line. However, because rustc
internally stores line numbers starting at zero, lookup_debug_loc() adjusts
every line number by one. Special casing DUMMY_SP to actually emit line 0
ensures rustc communicates to the debugger that there's no meaningful source
code for this instruction, rather than telling the debugger to jump to line 1
randomly.
Diffstat (limited to 'tests/codegen/patchable-function-entry')
0 files changed, 0 insertions, 0 deletions
