Re: [Gambas-devel] Debugging gambas-source-code
Brought to you by:
gambas
|
From: Brandon B. <bd...@ma...> - 2005-03-28 07:01:48
|
On Mon, 28 Mar 2005, Charlie Reinl wrote: >>> >>> >>> 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) >> >> Thanks. >> >> But I think that gbx -p does that, so I will look if I pass the >> args in a right way. > > > The arg was set right and the modules are NOT loaded, > I can debug it in gbx, > but when gbx has done his job, the thread says 'runnig' but shows no more > > loaded part. > > Anything to do, to load that, or ??? > It's a step by step list. Here's a clarified version, using command line gdb: $ gdb gbx <- start gdb from the command line set args -p <- set program arguments to disable preloading break TRACE_init <- set our initial breakpoint run <- execute gbx. (gdb stops at TRACE_init, and you get a gdb prompt.) >>>!Here's where you can set your breakpoints!<<< example: "break CTableView.cpp:45" should break on or near line 45 of file CTableView.cpp. cont <- continue execution from where we entered the debugger. (gdb now stops at your breakpoints) > > >> >>> 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 >>>> >>> >>> >>> ------------------------------------------------------- >>> SF email is sponsored by - The IT Product Guide >>> Read honest & candid reviews on hundreds of IT Products from real users. > >>> Discover which products truly live up to the hype. Start reading now. >>> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >>> _______________________________________________ >>> Gambas-devel mailing list >>> Gam...@li... >>> https://lists.sourceforge.net/lists/listinfo/gambas-devel >>> >>> >> >> * Gesendet mit / Sent by: FEN-Webmail * http://www.fen-net.de * >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> Gambas-devel mailing list >> Gam...@li... >> https://lists.sourceforge.net/lists/listinfo/gambas-devel >> >> > > * Gesendet mit / Sent by: FEN-Webmail * http://www.fen-net.de * > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Gambas-devel mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gambas-devel |