Debugging Julia programs that have 'C' function calls with gdb

127 views
Skip to first unread message

Sharmila Gopirajan Sivakumar

unread,
Feb 5, 2014, 1:42:31 PM2/5/14
to julia...@googlegroups.com
Hi,
    I'm working on interfacing with mysql using the MySQL C api interface.  I'm stuck at a particular error that libmysqlclient.so emits.  I believe examining what is going on with gdb will help.  I saw the method described at http://docs.julialang.org/en/latest/manual/faq/  .  That is for Julia's internals and I actually need to execute a julia file to get to the debug point.  Is it possible to specify the julia code file or I should just manually key in the preparatory steps?

Regards,
Sharmi

Isaiah Norton

unread,
Feb 5, 2014, 2:05:07 PM2/5/14
to julia...@googlegroups.com
You can run julia under gdb and set a breakpoint as needed in the C code (so, immediately prior to the error condition). eg:

bash$ gdb julia
...
(gdb) break xyz.c:123
(gdb) run
...
julia> include("myfile")
...
breakpoint at ...
(gdb)

(Continuing will return to the Julia prompt)
Reply all
Reply to author
Forward
0 new messages