From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23812 invoked by alias); 17 Jul 2002 01:41:12 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 23796 invoked from network); 17 Jul 2002 01:41:10 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 17 Jul 2002 01:41:10 -0000 Received: from dsl254-114-096.nyc1.dsl.speakeasy.net ([216.254.114.96] helo=nevyn.them.org) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17UdoT-0007GN-00; Tue, 16 Jul 2002 20:41:09 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17UdoT-00026K-00; Tue, 16 Jul 2002 21:41:09 -0400 Date: Tue, 16 Jul 2002 18:41:00 -0000 From: Daniel Jacobowitz To: Lucy Zhang Cc: gdb@sources.redhat.com Subject: Re: multi-thread debugging not working Message-ID: <20020717014109.GA7961@nevyn.them.org> Mail-Followup-To: Lucy Zhang , gdb@sources.redhat.com References: <008001ea898d$73096110$9a0a0109@zhangl> <20020716202321.GA28627@nevyn.them.org> <002201ea89ac$0bfdbce0$9a0a0109@zhangl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002201ea89ac$0bfdbce0$9a0a0109@zhangl> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-07/txt/msg00164.txt.bz2 On Tue, Jul 16, 2002 at 04:55:57PM -0700, Lucy Zhang wrote: > Hi, > > > Yes, the newer version of GDB solved the previous problem. > > Now I have a new problem with not being able to debug my multi-threaded > program. I'm debugging using an ELF core dump that was coverted from another > format. The program i'm debugging has about 20 threads. It may be because > the ELF file i'm creating is missing certain information. Right now I'm at a > loss as to what could be missing which GDB might be looking for in order to > see the multiple threads. Does anyone have any ideas on how GDB recognize > threads from an ELF core dump? There should be a PT_NOTE section (or two or three of them) for every single thread, containing its registers. Most GNU/Linux systems at least do not dump adequate information; you'll have to investigate your dump format/conversion. > > Below is the output from GDB: > ---------------------------------------- > /work/lucy/gdb-5.2/gdb > ./gdb > GNU gdb 5.2 > Copyright 2002 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". > Setting up the environment for debugging gdb. > .gdbinit:5: Error in sourced command file: > No symbol table is loaded. Use the "file" command. > (gdb) file /work/lucy/lucy1_0524/src/user/elf/vlio_test8.020715.042017 > Reading symbols from > /work/lucy/lucy1_0524/src/user/elf/vlio_test8.020715.042017...done. > (gdb) core-file /work/lucy/lucy1_0524/src/user/elf/elf.020715.042017 > Core was generated by `vlio_test8'. > Program terminated with signal 4, Illegal instruction. > Reading symbols from /lib/i686/libpthread.so.0...done. > Loaded symbols for /lib/i686/libpthread.so.0 > Reading symbols from /lib/i686/libm.so.6...done. > Loaded symbols for /lib/i686/libm.so.6 > Reading symbols from /usr/lib/libpopt.so.0...done. > Loaded symbols for /usr/lib/libpopt.so.0 > Reading symbols from /lib/i686/libc.so.6...done. > Loaded symbols for /lib/i686/libc.so.6 > Reading symbols from /lib/ld-linux.so.2...done. > Loaded symbols for /lib/ld-linux.so.2 > #0 0x40091aa5 in sigset (sig=-1073747472, disp=0x20) at > ../sysdeps/posix/sigset.c:69 > 69 ../sysdeps/posix/sigset.c: No such file or directory. > in ../sysdeps/posix/sigset.c > > (gdb) info threads > * 1 process 1491 0x40091aa5 in sigset (sig=-1073747472, disp=0x20) > at ../sysdeps/posix/sigset.c:69 > (gdb) thread 0 > Thread ID 0 not known. > (gdb) thread 2 > Thread ID 2 not known. > (gdb) thread 3 > Thread ID 3 not known. > (gdb) > > Thanks, > Lucy > > > ----- Original Message ----- > From: "Daniel Jacobowitz" > To: "Lucy Zhang" > Cc: > Sent: Tuesday, July 16, 2002 1:23 PM > Subject: Re: problem loading libpthread.so > > > > On Tue, Jul 16, 2002 at 01:17:05PM -0700, Lucy Zhang wrote: > > > Hi, > > > > > > I used GDB to debug an ELF core dump which was converted from a > different > > > formatted dump. However when I run GDB I get the following error: > > > This GDB was configured as "i386-redhat-linux"... > > > Core was generated by `vlio_test8'. > > > Program terminated with signal 4, Illegal instruction. > > > Reading symbols from /lib/i686/libpthread.so.0...done. > > > > > > warning: Unable to set global thread event mask: generic error > > > Segmentation fault (core dumped) > > > > > > > Does anyone know what may have caused the seg fault. I'm not very > familiar > > > with GDB at all. So if anyone has any guess or intuitions about the > cause of > > > this problem please share. > > > > You need to get a newer version of GDB. Check 5.2, from > > http://sources.redhat.com/gdb/, and see if that works better. > > > > -- > > Daniel Jacobowitz Carnegie Mellon University > > MontaVista Software Debian GNU/Linux Developer > > -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer