[mercury-users] debugging interfaces to C libraries

Peter Ross pro at missioncriticalit.com
Wed May 30 18:05:52 AEST 2007


On 5/30/07, Jörg Roman Rudnick <joerg.rudnick at t-online.de> wrote:
> Doug just reminded me about sitting over mercury_tk and in fact having a
> little worry:
>
> Although with some experience of the C interface of Tcl/Tk, I am afraid
> to be in lack of some professional techniques which would make work
> easier for me:
>
> How do you conveniently dive into a C backend of an interface when
> debugging?
> A major problem is that the 'highlights' of Tk -- text and canvas widget
> -- seem to crash at a higher rate of user interaction (did somebody
> encounter that, too??).
>
Use the grade grade hlc.gc.ll_debug (make sure that it is installed)

I then compile with the flag --no-line-numbers and then run gdb on the
resulting executable and search for the seg fault.

The .ll_debug extension simply does all the heavy lifting of compiling
everything with -g for you.

--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list