[all-commits] [llvm/llvm-project] a58112: [LLDB] Fix DW_OP_implicit_value GetOpcodeDataSize(...

Thrrreeee via All-commits all-commits at lists.llvm.org
Mon Jun 8 20:51:17 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a581124cd4b332d04ba1e7824066f41ae8a31b42
      https://github.com/llvm/llvm-project/commit/a581124cd4b332d04ba1e7824066f41ae8a31b42
  Author: Thrrreeee <shijinrui at bytedance.com>
  Date:   2026-06-09 (Tue, 09 Jun 2026)

  Changed paths:
    M lldb/source/Expression/DWARFExpression.cpp
    A lldb/test/Shell/SymbolFile/DWARF/x86/DW_OP_impilict_value.s
    M lldb/unittests/Expression/DWARFExpressionTest.cpp

  Log Message:
  -----------
  [LLDB] Fix DW_OP_implicit_value GetOpcodeDataSize() error (#201344)

LLDB does not handle `DW_OP_implicit_value` right, causing a "cannot get
opcode data size for Unknown DW_OP constant" error when LLDB parses
location expressions containing this opcode.

`DW_OP_implicit_value` takes two operands: a ULEB128-encoded length
followed by a byte sequence of that length. The current
`GetOpcodeDataSize` implementation has no case for this opcode, only
skip. This prevents LLDB from correctly determining opcode boundaries
when scanning multi-operation location expressions.

>From DWARFv5
> The DW_OP_implicit_value operation specifies an immediate value using
two operands: an unsigned LEB128 length, followed by a sequence of bytes
of the given length that contain the value.

Although the evaluation path (`DWARFExpression::Evaluate`) handles this
opcode correctly and produces the right result, the validation/parsing
path emits a confusing error message to the user.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list