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.
|
||
|---|---|---|
| .. | ||
| metadata | ||
| create_scope_map.rs | ||
| doc.md | ||
| gdb.rs | ||
| metadata.rs | ||
| mod.rs | ||
| namespace.rs | ||
| utils.rs | ||