[lldb-dev] [Bug 17941] New: lldb prefers class member to function argument when evaluating expression

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Nov 15 06:28:54 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=17941

            Bug ID: 17941
           Summary: lldb prefers class member to function argument when
                    evaluating expression
           Product: lldb
           Version: 3.2
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at cs.uiuc.edu
          Reporter: christophe at taodyne.com
    Classification: Unclassified

I observed the issue while debugging something in the following code:
https://gitorious.org/xlr/xlr/commit/be2f08174b3a56a8673093f131945bb011350ddf.
To reproduce easily, build XLR (I built it against LLVM 2.9, it's likely to
fail with more recent untested versions)

The following sequence exposes the problem:

ddd at Marypuce[atomic-gc] xlr> cat t.xl 
writeln "real ", (10 ^ (2.0))
writeln "int ", (10 ^ 2) 

ddd at Marypuce[atomic-gc] xlr> lldb xlr 
Current executable set to 'xlr' (x86_64).

(lldb) b 'XL::OCompiledUnit::CallInteger2Real'
Breakpoint 1: where = xlr`XL::OCompiledUnit::CallInteger2Real(XL::Tree*,
XL::Tree*) + 29 at symbols.cpp:3550, address = 0x00000001000be95d

(lldb) r t.xl
Process 12381 launched: '/Users/ddd/Work/tao-master/tao/xlr/xlr/xlr' (x86_64)
Process 12381 stopped
* thread #1: tid = 0x16daa7, 0x00000001000be95d
xlr`XL::OCompiledUnit::CallInteger2Real(this=0x00007fff5fbfce40,
compiled=0x000000010103fb80, value=0x00000001010b6100) + 29 at
symbols.cpp:3550, queue = 'com.apple.main-thread, stop reason = breakpoint 1.1
    frame #0: 0x00000001000be95d
xlr`XL::OCompiledUnit::CallInteger2Real(this=0x00007fff5fbfce40,
compiled=0x000000010103fb80, value=0x00000001010b6100) + 29 at symbols.cpp:3550

   3547    //    Compile code generating the children of an infix
   3548    //
----------------------------------------------------------------------------
   3549    {
-> 3550        Value *result = Known(value);
   3551        result = code->CreateCall(compiler->xl_integer2real, result);
   3552        NeedStorage(compiled);
   3553        MarkComputed(compiled, result);
(lldb) p value
(XL::value_map) $0 = size=0 {}

The declaration of the function is:

Value *OCompiledUnit::CallInteger2Real(Tree *compiled, Tree *value)

So I expect 'value' to return a Tree *, not a value_map. The value_map is
declared in class OCompiledUnit.

-- 
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/20131115/e7f63a26/attachment.html>


More information about the lldb-dev mailing list