Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Debugger doesn't seem to work with the JIT #2942
I'm trying out the Rubinius debugger, but I can't seem to get it set a breakpoint on a method that has already been compiled. They do work before the method is compiled.
Expected behaviour is that the breakpoints would work on compiled code, and presumably the compiled code would be deoptimized when I install the breakpoint.
This is with v2.2.4, Mac, x86_64.
Take this test file,
Run it and set a breakpoint on line 5. The breakpoint doesn't seem to work.
Perhaps it's the JIT - try it with JIT disabled.
Now it works.
We can also make it work by not running enough iterations to provoke the JIT -
I'll partially provide a solution to my own problem -- I needed to use
I'll leave this open as a bug as I don't think his isn't as clear as it could be -- at the moment it fails depending on whether a method has been compiled, which a normal user may not be aware of. It doesn't even provide an error message -- I could be waiting for the breakpoint to be hit, not aware that it's running in compiled code.
Could Rubinius deoptimize the method when I install the breakpoint? Or tell me if I try to install a breakpoint in a method that has been compiled, and tell me to use this flag?