[Gambas-devel] Some wierd gdb behaviour (I think)

Laurent Carlier lordheavym at ...176...
Sat Oct 4 22:06:02 CEST 2008


Le mardi 30 septembre 2008 14:12:27 Ron, vous avez écrit :
> Ron schreef:
> > Hi,
> >
> > Been trying to debug my program, because after adding some functionality
> > every now and then it crashes (gambas), before that it was rock stable.
> > But upgraded from 2.8.1 to 2.8.2 in the meantime also...
> >
> > I compile and start my program like the website says, this is what I get:
> >
> > -----------------
> > ron at ...218...:~/domotiga/DomotiGa$ gdb gbx2
> > GNU gdb 6.4.90-debian
> > Copyright (C) 2006 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 "i486-linux-gnu"...Using host
> > libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
> >
> > (gdb) set args -p
> > (gdb) run
> > Starting program: /usr/local/bin/gbx2 -p
> > Failed to read a valid object file image from memory.
> > [Thread debugging using libthread_db enabled]
> > [New Thread -1209992992 (LWP 8372)]
> > [New Thread -1231660112 (LWP 8376)]
> > [New Thread -1242149968 (LWP 8377)]
> > [Thread -1242149968 (zombie) exited]
> > [Thread -1231660112 (LWP 8376) exited]
> > [New Thread -1231660112 (LWP 8378)]
> > [New Thread -1242149968 (LWP 8379)]
> > [New Thread -1250542672 (LWP 8380)]
> > [Thread -1250542672 (zombie) exited]
> > [New Thread -1250542672 (LWP 8381)]
> > open /dev/sequencer: No such file or directory
> > Qt: gdb: -nograb added to command-line options.
> >          Use the -dograb option to enforce grabbing.
> > [New Thread -1266635856 (LWP 8385)]
> > [Thread -1266635856 (LWP 8385) exited]
> > [New Thread -1266635856 (LWP 8386)]
> > [Thread -1266635856 (LWP 8386) exited]
> > [New Thread -1266635856 (LWP 8390)]
> > [Thread -1266635856 (LWP 8390) exited]
> > [New Thread -1266635856 (LWP 8391)]
> > [Thread -1266635856 (LWP 8391) exited]
> > Segmentation fault (core dumped)
> > ron at ...218...:~/domotiga/DomotiGa$
> > --------
> >
> > the first thing that worries me, are the 2 zombie threads in the
> > beginning, is this normal?
> >
> > Then when I click a certain menu, which lanches a part of my program
> > which calls rrdtool to generate graphs (SHELL sRRDCmd2 WAIT) were
> > sRRDCmd2 is a large command string which calls rrdtool graph...
> >
> > the gdb session gives Segmentation fault (core dumped)
> > ron at ...218...:~/domotiga/DomotiGa$
> > and the gdb session is closed, my program continues to run...
> >
> > Is this normal? Because I started another program in the shell? My
> > gambas program still runs and functions ok after this...
> > What is wrong? This way I cannot debug my program without removing some
> > functionality first.
> > Did I overlook something?
> >
> > Gambas 2.8.2 on Debian 4.0etch3
> >
> > Wanted to run it as root, but it's a headless server, and cannot get X
> > to run remote for root... will have to look tomorrow...
> > Do you need to run it as root to get the debugging info (see the Failed
> > to read a valid object file image from memory. error)
> >
> > Regards,
> > Ron_2nd
>
> OK,
> so I compiled gdb 6.8 from scratch, and run my program with that, this
> is the first result:
>
> ron at ...218...:~/domotiga/DomotiGa.112ok$ gdb gbx2
> GNU gdb 6.8
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i686-pc-linux-gnu"...
> (gdb) set args -p
> (gdb) run
> Starting program: /usr/local/bin/gbx2 -p
> Failed to read a valid object file image from memory.
> [Thread debugging using libthread_db enabled]
> [New Thread 0xb7dca8e0 (LWP 4648)]
> Qt: gdb: -nograb added to command-line options.
>          Use the -dograb option to enforce grabbing.
> [New Thread 0xb654cbb0 (LWP 4660)]
> [Thread 0xb654cbb0 (LWP 4660) exited]
> [New Thread 0xb5d4bbb0 (LWP 4661)]
> [Thread 0xb5d4bbb0 (LWP 4661) exited]
> [New Thread 0xb654cbb0 (LWP 4662)]
> [Thread 0xb654cbb0 (LWP 4662) exited]
> [New Thread 0xb654cbb0 (LWP 4666)]
> [Thread 0xb654cbb0 (LWP 4666) exited]
> ...
> [New Thread 0xb654cbb0 (LWP 5586)]
> [Thread 0xb654cbb0 (LWP 5586) exited]
> ...
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0xb7dca8e0 (LWP 4648)]
> 0xb700e2bb in ?? () from /usr/lib/libcurl.so.3
> (gdb) bt
> #0  0xb700e2bb in ?? () from /usr/lib/libcurl.so.3
> #1  0xb6feefa0 in ?? () from /usr/lib/libcurl.so.3
> #2  0x080d6970 in ?? ()
> #3  0xb7f65ff4 in ?? () from /lib/ld-linux.so.2
> #4  0x080d66d8 in ?? ()
> #5  0x00000001 in ?? ()
> #6  0x00000000 in ?? ()
> (gdb)
>
>
> Ok, so I miss important debug information, dunno why yet, but at least
> gdb itself is not crashing like the 6.4 version did.
> But am I correct to notice the sigsegv is due to problem in/with libcurl?
>
> Any changes in gb.net.curl recently, say last 1 1/2 week?
> Anyone using it in their program?
>
> Will try to weed out the gb.net.curl dependant code from my program, to
> see if this is the only problem.
>
> Any ideas as  how to get more debugging info inside my gdb would be fab.
>
> Debian 4.0 etch 3, qt, Gambas 2.99 recent svn
>
> Regards,
> Ron_2nd
>

You need to add too  *-dbg related packages to get debugging informations.

Regards,





More information about the Devel mailing list