4 ms·
This effort is effectively the revival of half of Gallium. At the end Gallium was a combination of two debugging techniques — it was both a "native" gdb/lldb-s
by 3JPLW 8y ago
This effort is effectively the revival of half of Gallium. At the end Gallium was a combination of two debugging techniques — it was both a "native" gdb/lldb-style compiled debugger as well as an interpreter. The native debugging was fast but indeed challenging and rather limited — most Julia code gets optimized away when it gets compiled leaving you with a rather unhelpful stack frame that's challenging to line back up with your original code. So there was also a rudimentary interpreter (the ancestor of this interpreter) for other cases.
- saagarjha 8y agoIs there no way to compile Julia with debugging symbols and frame pointers?
- eigenspace 8y agoSomething like this is currently being attempted with MagneticReadHead.jl[1] which also just saw its first beta release. It's a pretty cool tool, using Cassette to essentially do an extra compiler pass, descending into code from other modules and inject the appropriate debugging tools. [1] https://github.com/oxinabox/MagneticReadHead.jl https://github.com/oxinabox/MagneticReadHead.jl
- StefanKarpinski 8y agoMagneticReadHead is a bit different than what I think your parent post was asking about—that's more what Gallium was. The breakdown of approach is: 1. Gallium was a traditional gdb/lldb-style debugger 2. Debugger.jl is a pure interpreting debugger 3. MagneticReadHead works by compiling a modified version of the code you want to debug that is instrumented to add debugging hooks (this is different from how gdb/lldb work).
- eigenspace 8y agoOh I misread the parent. My bad.
- wallnuss 8y agoIt does by default so you can use gdb/lldb and perf on Julia code.
- StefanKarpinski 8y agoIf you want to debug Julia itself, you can use gdb/lldb on it. That plus using the `jl_` function to dump values gets you a pretty decent debugger if you're comfortable in gdb/lldb, but it's not an experience that most Julia users would be happy with and you cannot evaluate code in the current stack frame's context or set breakpoints with Julia expressions as conditions. Debugger.jl lets you do all of that.