Re: [Anjuta-list] How to debug a gtk thread in Anjuta?



Carlo Agrusti ha scritto:

Michele Bendazzoli ha scritto lo scorso 10/03/2006 10:02:
Here I'm again ...
I thougth that my basic problem goes away when I adopt the libglade
approach but I was too much rushed.
Now I'm able to set the GtkTextView widget, open the file but ... I'm
not able to debug my functions!
When I set a breakpoint in a "some_signal_handler_func" (on_new_activate
by example) that is outside of the main loop infact, the debugger stop
when the control of program reach the breakpoint but doesn't let me to
debug it (the step into, step over ... menu item are all disabled).

This happen because the handler_function is executed in a separated
thread, automaticaly managed by the libglade functions?
And, if so, how the hell can I debug my handler_functions?


Which CFLAGS did you use to compile your application? If you used -O2
(which is Anjuta default) gdb will do silly things while stepping
around, provided that he has at list line code information (those
provided by -g switch). Try configuring your app with CFLAGS="-O0 -g".
I send another message related to this topic just before to read you message: maybe your question is related also to the other. However, i keep the standard setting that the libglade project wizard made (I'm a newbye on both c language and linux programming environment and still I don't know how to setup correctly the flags you mention).

I only check that there aren't any optimization and that the debug flag is checked (after reading the debug section on the Anjuta manual). From what I see, seems that the additional CFLAGS in the compiler and setting was empty. It is necessary to set some of them?

Thank you in advance for any advice.

ciao, Michele




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