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

via lldb-dev lldb-dev at lists.llvm.org
Thu Aug 1 02:03:55 PDT 2019


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

Christophe de Dinechin <christophe at taodyne.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #2 from Christophe de Dinechin <christophe at taodyne.com> ---
(In reply to Jonas Devlieghere from comment #1)
> The XLR language doesn't seem maintained anymore. I can't even find the
> source code. Closing this as insufficient information.

Gitorious may have disappeared, but XL still exists and is actively being
refactored. There is one source repository here: https://github.com/c3d/xl
(last commit on master was two weeks ago, but that's mostly because I spent
these two weeks on vacation ;-). There is a copy on https://gitlab.com/c3d/xl
in case it takes another 5 years to look at this bug and github is gone by then
;-)

The be2f08174 still exists in the tree. Problem is that it requires
llvm-config-2.9, which is a bit hard to find these days.

The current code has changed sufficiently that it's almost hopeless to
reproduce a procedure that worked 5 years ago. I tried to reproduce on current
'master' by injecting a class member that has the same name as a local
parameter, see
https://github.com/c3d/xl/commit/65eb5a444468ee763553f788bda98c2fadecf23b,
putting the breakpoint on CompilerUnit::Global this time (it's a very simple
function).

The results would tend to indicate that the bug has been fixed. In opt builds,
LLDB can't find the variable, but it does not show the member either.

Results with current LLDB:

- Opt build:

frame #4: 0x00000001000f994e libxl.0.dylib`XL::CompilerUnit::Compile()
[inlined] XL::CompilerUnit::Global(this=<unavailable>, tree=<unavailable>,
value=<unavailable>) at compiler-unit.cpp:217 [opt]
   214  //    Record the global value associated to a tree
   215  //
----------------------------------------------------------------------------
   216  {
-> 217      globals[tree] = value;
   218  }
   219  
   220  
(lldb) p value
error: Couldn't materialize: couldn't get the value of variable value: variable
not available
error: errored out in DoExecute, couldn't PrepareToExecuteJITExpression

(This is probably the original case where the local variable had been
eliminated from debug records, and the member was shown instead)


- Debug build: seems to work

There is a running process, kill it and restart?: [Y/n] y
Process 47165 exited with status = 9 (0x00000009) 
Process 47187 launched: '/Users/ddd/Work/Xcode/xl/xl/xl' (x86_64)
Process 47187 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 3.1
    frame #0: 0x0000000100129eb8
libxl.0.dylib`XL::CompilerUnit::Global(this=0x00007ffeefbfeb88,
tree=0x000000010354ec58, value=0x0000000103027708) at compiler-unit.cpp:217:21
   214  //    Record the global value associated to a tree
   215  //
----------------------------------------------------------------------------
   216  {
-> 217      globals[tree] = value;
   218  }
   219  
   220  
Target 0: (xl) stopped.
(lldb) p value
(XL::Value_p) $0 = 0x0000000103027708

So I guess after reviewing this, you can close the bug again. Just reopening in
case you want to look at the original source 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/20190801/f66ca39c/attachment.html>


More information about the lldb-dev mailing list