[Gambas-devel] Debugging gambas-source-code
Charlie Reinl
na2492 at ...16...
Mon Mar 28 22:53:12 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.
>
Linux gentoo01 2.6.8-gentoo-r3 #1 SMP Sun Feb 13 21:57:11 CET 2005 i686
AMD Athlon(tm) MP AuthenticAMD GNU/Linux
>
and here more about my box
Using:
- gambas-1.0.4 (downloaded from the gambas-shrine)
- X Window System Version 6.8.2 Release Date: 9 February 2005
X Protocol Version 11, Revision 0, Release 6.8.2
Build Operating System: Linux 2.6.8-gentoo-r3 i686 [ELF]
Current Operating System: Linux gentoo01 2.6.8-gentoo-r3 #1 SMP
Sun Feb 13 21:57:11 CET 2005 i686
- gentoo 1.4 (last Updated 27.03.2005) on Gentoo Base System version
1.4.16
- Qt: 3.3.3
- KDE: 3.3.1
- gcc (GCC) 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2,
pie-8.7.6)
- mysql Ver 12.22 Distrib 4.0.22, for pc-linux-gnu (i686)
- psql (PostgreSQL) 7.4.6
- sqlite 2.8.15
- GNU Make 3.80>>
>> 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
>
>
>-------------------------------------------------------
>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
>
>
* Gesendet mit / Sent by: FEN-Webmail * http://www.fen-net.de *
More information about the Devel
mailing list