What
Extend .debug_loclists with the computed/fragmented opcode set on top of the framing: DW_OP_stack_value (value-not-location, for constants and salvaged exprs), DW_OP_constu/consts, DW_OP_plus_uconst and arithmetic, and DW_OP_piece/DW_OP_bit_piece for variables split across multiple homes. Consumes the DCE-salvaged expressions from #1696. Shared, covers ELF + Mach-O.
Why
On optimized output a variable is often a constant, a recovered arithmetic expression, or split across a register + a slot — none expressible by reg/breg ranges alone. This is the second half of loclists, split out from the framing for PR sizing (the framing issue was too large to land as one change).
Acceptance
- lldb shows correct values for constant-folded and register/slot-fragmented locals on an optimized -g binary, both primes; salvaged values render via DW_OP_stack_value, never garbage.
- llvm-dwarfdump --verify clean.
Depends-on: #1705.
What
Extend .debug_loclists with the computed/fragmented opcode set on top of the framing: DW_OP_stack_value (value-not-location, for constants and salvaged exprs), DW_OP_constu/consts, DW_OP_plus_uconst and arithmetic, and DW_OP_piece/DW_OP_bit_piece for variables split across multiple homes. Consumes the DCE-salvaged expressions from #1696. Shared, covers ELF + Mach-O.
Why
On optimized output a variable is often a constant, a recovered arithmetic expression, or split across a register + a slot — none expressible by reg/breg ranges alone. This is the second half of loclists, split out from the framing for PR sizing (the framing issue was too large to land as one change).
Acceptance
Depends-on: #1705.