What
Emit DW_TAG_variable/DW_TAG_formal_parameter with DW_AT_location = DW_FORM_exprloc holding ONE expression (DW_OP_fbreg/breg for stack, DW_OP_reg* for register, DW_OP_addr for global) + DW_TAG_lexical_block scoping, read from the OP_DBG_VALUE entity. Register numbers come from #1693 (per-ISA). NO .debug_loclists yet. Shared, covers ELF + Mach-O on all ISAs.
Why
frame variable / info locals for variables that live in one place across their scope (the common case) — the first half of the variable-location capability, without loclists machinery. Frame-slot offsets are already in MirFunction.frame; the single final home is on MirVReg.assigned/spill_slot.
Acceptance
- lldb/gdb frame variable shows correct values for stationary locals/params on a sample -g program, on x64/arm64/riscv64 where the prime applies (correct DWARF register numbers per ISA).
- DW_OP_fbreg locations rely on the retained-frame-pointer invariant (no FP omission under -g).
- llvm-dwarfdump --verify clean.
Depends-on: #1703, #1695, #1693.
What
Emit DW_TAG_variable/DW_TAG_formal_parameter with DW_AT_location = DW_FORM_exprloc holding ONE expression (DW_OP_fbreg/breg for stack, DW_OP_reg* for register, DW_OP_addr for global) + DW_TAG_lexical_block scoping, read from the OP_DBG_VALUE entity. Register numbers come from #1693 (per-ISA). NO .debug_loclists yet. Shared, covers ELF + Mach-O on all ISAs.
Why
frame variable / info locals for variables that live in one place across their scope (the common case) — the first half of the variable-location capability, without loclists machinery. Frame-slot offsets are already in MirFunction.frame; the single final home is on MirVReg.assigned/spill_slot.
Acceptance
Depends-on: #1703, #1695, #1693.