[lldb-dev] [Bug 46833] New: LLDB is missing support for DW_OP_implicit_value dwarf operation

via lldb-dev lldb-dev at lists.llvm.org
Fri Jul 24 04:07:42 PDT 2020


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

            Bug ID: 46833
           Summary: LLDB is missing support for DW_OP_implicit_value dwarf
                    operation
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: sourav0311 at gmail.com
                CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org

LLDB is missing support for DW_OP_implicit_value dwarf operation.

clang was also not supporting this, seems like in some cases
DW_op_implicit_value is indispensable. 

Support is added in clang with currently emission restricted for debugger
tunning GDB.

For more details please refer: https://reviews.llvm.org/D83560

For a typical use case compiled as 
$tot-clang -ggdb -O1 test.c
or with gcc also
$gcc -ggdb -O1 test.c //GCC uses DW_OP_implicit_value ubiquitously for all
floating point constants.

Error log:
Process 24530 launched: '/hack/a.out' (x86_64)
Process 24530 stopped
* thread #1, name = 'a.out', stop reason = breakpoint 1.1
    frame #0: 0x000000000040112a a.out`main at implicit-float.c:3:2
   1    int main() {
   2            float a = 3.14f;
-> 3            printf("foo\n");
   4            a *= a;
   5            return 0;
   6    }
(lldb) p a
error: Couldn't materialize: couldn't get the value of variable a: Unhandled
opcode DW_OP_implicit_value in DWARFExpression
error: errored out in DoExecute, couldn't PrepareToExecuteJITExpression

-- 
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/20200724/16916346/attachment.html>


More information about the lldb-dev mailing list