[Lldb-commits] [lldb] [lldb] Allow generic operands in DWARF binary type check (PR #209641)

via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 15 04:09:00 PDT 2026


firmiana402 wrote:

Thanks for the quick fix and for the detailed explanation.

While looking at the breakpad example you mentioned, I noticed what may be a separate issue in the current `DW_OP_breg*` evaluator.

For `DW_OP_breg7 +0, DW_OP_consts +80, DW_OP_plus`, I think the surprising part is that `DW_OP_breg7` produces an 8-byte scalar on a 32-bit target. DWARF says that `DW_OP_breg0..31` / `DW_OP_bregx` push the register-plus-offset result with the generic type. On an i386 target, that generic type should be address-sized, i.e. 4 bytes.

So the mixed 8-byte / 4-byte operands in that expression may actually be exposing another LLDB bug: the `DW_OP_breg*` result seems to be widened to 64 bits before later generic arithmetic sees it.

I wrote this up separately here: #209728

I would appreciate your thoughts on whether this interpretation looks right. If it does, I can also work on a follow-up patch to canonicalize the `DW_OP_breg*` result back to the target generic/address size.

https://github.com/llvm/llvm-project/pull/209641


More information about the lldb-commits mailing list