Re: [Gnome-devtools] debugging gtk programs



--- Roel <roel lufthansa com> wrote:
> 
> Hi everybody,
> 
> Excuse me if this is off-topic, but I don't know
> where to ask, so here I
> go.
> What is the best way to debug a gtk program? If I
> just do 'run' in gdb, the
> program will do all the startup functions and I can
> trace through that, but
> then when it comes in the main loop, I loose
> control. Where can I find some
> information on this? Thanks.

You mean that you can't debug after your program
enters gtk_main()? That's normal, since at that point
control is given to gtk. Depending on what you want to
debug, set a breakpoint on that routine. For instance
if you want to debug a button, put a breakpoint on the
callback routine for the button. If you then run the
program and press the button, the debugger will be
activated and you can step through the callback
function.

Dirk


__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]