[Gambas-devel] Debugging gambas-source-code
Brandon Bergren
bdragon at ...185...
Mon Mar 28 22:18:19 CEST 2005
On Mon, 28 Mar 2005, Charlie Reinl wrote:
>>>> 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)
>>
> Salut,
>
> here my output,
>
> bash-2.05b$ cd /opt/gambas/gambas/app/gambas
>
> bash-2.05b$ gdb gbx
>
> GNU gdb 6.0
> Copyright 2003 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for
> details.
> This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db
> library "/lib/libthread_db.so.1".
>
> (gdb) set args -p
>
> (gdb) break TRACE_init
>
> Breakpoint 1 at 0x805008c: file gbx_trace.c, line 234.
>
> (gdb) run
> Starting program: /usr/bin/gbx -p
> warning: Unable to find dynamic linker breakpoint function.
> GDB will be unable to debug shared library initializers
> and track explicitly loaded dynamic code.
Huh?
That shouldn't happen. That would explain why my instructions don't
work.
What does "uname -a" report?
That message means that /lib/ld-linux.so.2 is stripped, which prevents GDB
from detecting runtime loaded modules, which is something that's needed to
debug plugins.
>
> Breakpoint 1, TRACE_init () at gbx_trace.c:234
> 234 if (!EXEC_debug)
>
> (gdb) break /opt/gambas/gambas/src/lib/qt/ext/CTableView.cpp:1074
> No source file named /opt/gambas/gambas/src/lib/qt/ext/CTableView.cpp.
GDB doesn't know about CTableView.cpp because it failed to hook the
module load routine. (the warning message above)
>
> (gdb) break CTableView.cpp:1074
> No source file named CTableView.cpp.
>
Again, GDB doesn't know about the file because it couldn't detect the
module was loaded.
> I had a look to qt/ext and I'm saw it was compiled with -g
> So it has to be something else, I ignore ?
>
> To you have an easier call, which work on your box. Just for testing ?
>
Post your "uname -a" result and I'll figure out how you can get the
debugging version of ld installed. Then the instructions will work.
>
> Amicalment
> Charlie
> * 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
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel
More information about the Devel
mailing list