This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: multi-thread debugging not working


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?

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" <drow@mvista.com>
To: "Lucy Zhang" <lucyz@uclink4.berkeley.edu>
Cc: <gdb@sources.redhat.com>
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]