[Gambas-devel] Debugging gambas-source-code

Brandon Bergren bdragon at ...185...
Sun Mar 27 20:52:42 CEST 2005


On Sat, 26 Mar 2005, Charlie Reinl wrote:

> Salut Benoit,
>
> actually I succeted to work with Eclipse 3.0 on the gambas-sourccode.
> I made it to an eclipse-project and can build it form there, without any
> change made to the original packet from the shrine.
>
> Today I also succeted to custemize the eclipse - debugger (which use gdb) to
> debug gambas.
>
> But I olny can debug binaries from the project, which are gba, gbc, gbi and
> gbx.
>
> Not knowing gdb well, my question is, is it possible to debug components ?
> And if, what have I to do to have access ?

Yes.

You need to set your breakpoints AFTER the modules are loaded.

1. Disable preloading. (gdb doesn't get along with preloading)
2. Break after library load.
gdb command "break TRACE_init" should do the trick for gbx.
(TRACE_init() isn't called until after LIBRARY_load_all() in gbx.c, as 
far as I can tell.)
3. Set your breakpoints.
4. "c"ontinue execution.


>
> If I set a breakpoint in CTableView.cpp gdb
> say
> 'No source file named CTableView.cpp.
> warning: Unable to find dynamic linker breakpoint function.
> GDB will be unable to debug shared library initializers
> and track explicitly loaded dynamic code.'
>
> Would be nice to have some help, about that.
>
> Send you an SnapShot
>
> Amicalment
> Charlie
>




More information about the Devel mailing list