rust/compiler/rustc_codegen_llvm/src/debuginfo
Kyle Huey 78caecf8f3 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.
2024-08-03 21:18:52 -07:00
..
metadata Reformat use declarations. 2024-07-29 08:26:52 +10:00
create_scope_map.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
doc.md fix most compiler/ doctests 2022-05-02 17:40:30 -07:00
gdb.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
metadata.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
mod.rs Special case DUMMY_SP to emit line 0/column 0 locations on DWARF platforms. 2024-08-03 21:18:52 -07:00
namespace.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
utils.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00