[lldb-dev] [Bug 44621] New: LLDB may use wrong operand size of DW_OP_call_ref

via lldb-dev lldb-dev at lists.llvm.org
Wed Jan 22 05:02:38 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=44621

            Bug ID: 44621
           Summary: LLDB may use wrong operand size of DW_OP_call_ref
           Product: lldb
           Version: 10.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: ikudrin at accesssoftek.com
                CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org

In lldb/source/Expression/DWARFExpression.cpp, GetOpcodeDataSize(),
DW_OP_call_ref is handled in the same way as DW_OP_addr:

  switch (op) {
  case DW_OP_addr:
  case DW_OP_call_ref: // 0x9a 1 address sized offset of DIE (DWARF3)
    return data.GetAddressByteSize();

According to the DWARF standard, the operand size of DW_OP_call_ref is 4 or 8
bytes depending on the DWARF format (32- or 64-bit) and not an address size on
the target machine, as for DW_OP_addr.

Admittedly, I do not have a sample. I found that reviewing the code.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20200122/b943f8da/attachment.html>


More information about the lldb-dev mailing list