Skip to content

Commit 3340b2f

Browse files
committed
Documentation: add info about argument to jl_breakpoint
1 parent 177a520 commit 3340b2f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

doc/devdocs/debuggingtips.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,19 @@ In your ``gdb`` session, set a breakpoint in ``jl_breakpoint`` like so::
2929

3030
(gdb) break jl_breakpoint
3131

32-
Then within your Julia code, insert a call to ``jl_breakpoint`` by adding::
32+
Then within your Julia code, insert a call to ``jl_breakpoint`` by adding
33+
::
3334

3435
ccall(:jl_breakpoint, Void, ())
3536

36-
If you back up to the ``jl_apply`` frame, then you can display the arguments to the function using, e.g.,
37+
or alternatively
38+
::
39+
40+
ccall(:jl_breakpoint, Void, (Any,), obj)
41+
42+
if you want to inspect ``obj`` from within ``jl_breakpoint``.
43+
44+
It's particularly helpful to back up to the ``jl_apply`` frame, from which you can display the arguments to a function using, e.g.,
3745
::
3846

3947
(gdb) call jl_(args[0])

0 commit comments

Comments
 (0)