[Lldb-commits] [lldb] [lldb] Assemble scalar DW_OP_bit_piece fragments into composites (PR #219383)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 30 23:33:51 PDT 2026
================
@@ -2056,19 +2155,42 @@ llvm::Expected<Value> DWARFExpression::Evaluate(
eval_ctx.loc_desc_kind = Memory;
const uint64_t piece_bit_size = op->getRawOperand(0);
const uint64_t piece_bit_offset = op->getRawOperand(1);
+ if (piece_bit_size == 0)
+ break;
----------------
firmiana402 wrote:
Could we also consume the source here? A zero-sized bit piece contributes no bits, but leaving its source on the stack makes evaluation return stack.back() instead of the assembled composite. Please also add a regression test with a zero-sized bit piece followed by a non-empty one.
```suggestion
if (piece_bit_size == 0) {
stack.pop_back();
break;
}
```
https://github.com/llvm/llvm-project/pull/219383
More information about the lldb-commits
mailing list