Hi, I am trying to use gdb for julia debugging. Although there is a debugging tips, I still can’t find the correct way to use gdb for julia.
For example, I want to show values of variable
a in gdb for the following
a = 2 b = 3. f(x, y) = 2x + y d = f(a, b) println("d: $d")
What I do is to first insert code
ccall(:jl_breakpoint, Cvoid, (Any,), a) between line 3 and line 4, then I start gdb with
$gdb --args julia test.jl and do
(gdb) break jl_breakpoint . I also do
(gdb) handle SIGSEGV noprint nostop pass before running. After run the gdb, I can hit the function but when I try to do
(gdb) call jl_(a) , it will get
!!! ERROR in jl_ -- ABORTING !!! .
Can someone show me how to correctly use gdb for Julia? Thanks!