* cannot debug multi-threaded programs with gdb
@ 2002-09-13 10:07 Stuart Hughes
2002-09-13 13:51 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Stuart Hughes @ 2002-09-13 10:07 UTC (permalink / raw)
To: Linux-MIPS
Hi,
I've been trying to debug a simple multi-threaded test program using
gdb, and it always fails as follows:
[New Thread 1024 (LWP
39)]
Program received signal SIGTRAP, Trace/breakpoint
trap.
[Switching to Thread 1024 (LWP
39)]
warning: Warning: GDB can't find the start of the function at
0xffffffff.
I've tried various different compilers, gdb, glibc version but the
problem is the same. Note that I can debug non-threaded c/c++ programs
without any problem. My environment is as follows:
CPU: NEC VR5432
kernel: linux-2.4.10 + patches
glibc: 2.2.3 + patches
gdb: 5.2/3 from CVS
gcc: 3.1 (also tried 3.0.1)
binutils: Version 2.11.90.0.25
Does anyone have any idea what is wrong and how to fix it.
Regards, Stuart
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: cannot debug multi-threaded programs with gdb
2002-09-13 10:07 cannot debug multi-threaded programs with gdb Stuart Hughes
@ 2002-09-13 13:51 ` Daniel Jacobowitz
2002-09-13 14:10 ` Stuart Hughes
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2002-09-13 13:51 UTC (permalink / raw)
To: Stuart Hughes; +Cc: Linux-MIPS
On Fri, Sep 13, 2002 at 11:07:15AM +0100, Stuart Hughes wrote:
> Hi,
>
> I've been trying to debug a simple multi-threaded test program using
> gdb, and it always fails as follows:
>
> [New Thread 1024 (LWP
> 39)]
>
> Program received signal SIGTRAP, Trace/breakpoint
> trap.
> [Switching to Thread 1024 (LWP
> 39)]
> warning: Warning: GDB can't find the start of the function at
> 0xffffffff.
>
> I've tried various different compilers, gdb, glibc version but the
> problem is the same. Note that I can debug non-threaded c/c++ programs
> without any problem. My environment is as follows:
>
> CPU: NEC VR5432
> kernel: linux-2.4.10 + patches
> glibc: 2.2.3 + patches
Not enough patches I'd bet. Glibc 2.2.3 had an incorrect size listed
for elf_gregset_t, and it was fixed in 2.2.5. That would cause this
problem.
> gdb: 5.2/3 from CVS
> gcc: 3.1 (also tried 3.0.1)
> binutils: Version 2.11.90.0.25
>
> Does anyone have any idea what is wrong and how to fix it.
>
> Regards, Stuart
>
>
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cannot debug multi-threaded programs with gdb
2002-09-13 13:51 ` Daniel Jacobowitz
@ 2002-09-13 14:10 ` Stuart Hughes
0 siblings, 0 replies; 3+ messages in thread
From: Stuart Hughes @ 2002-09-13 14:10 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Linux-MIPS
[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]
Hi Daniel,
Thanks for your help. I also just found a posting by you from January
explaining this. I tried it out, and it works like a dream. FWIW I've
attached a patch I applied to glibc.
Regards, Stuart
Daniel Jacobowitz wrote:
>
> On Fri, Sep 13, 2002 at 11:07:15AM +0100, Stuart Hughes wrote:
> > Hi,
> >
> > I've been trying to debug a simple multi-threaded test program using
> > gdb, and it always fails as follows:
> >
> > [New Thread 1024 (LWP
> > 39)]
> >
> > Program received signal SIGTRAP, Trace/breakpoint
> > trap.
> > [Switching to Thread 1024 (LWP
> > 39)]
> > warning: Warning: GDB can't find the start of the function at
> > 0xffffffff.
> >
> > I've tried various different compilers, gdb, glibc version but the
> > problem is the same. Note that I can debug non-threaded c/c++ programs
> > without any problem. My environment is as follows:
> >
> > CPU: NEC VR5432
> > kernel: linux-2.4.10 + patches
> > glibc: 2.2.3 + patches
>
> Not enough patches I'd bet. Glibc 2.2.3 had an incorrect size listed
> for elf_gregset_t, and it was fixed in 2.2.5. That would cause this
> problem.
>
> > gdb: 5.2/3 from CVS
> > gcc: 3.1 (also tried 3.0.1)
> > binutils: Version 2.11.90.0.25
> >
> > Does anyone have any idea what is wrong and how to fix it.
> >
> > Regards, Stuart
> >
> >
>
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
[-- Attachment #2: glibc-2.2.3-gdb-pthread-diff --]
[-- Type: text/plain, Size: 518 bytes --]
--- glibc-2.2.3/sysdeps/unix/sysv/linux/mips/sys/procfs.h.orig Fri Sep 13 14:26:42 2002
+++ glibc-2.2.3/sysdeps/unix/sysv/linux/mips/sys/procfs.h Fri Sep 13 14:26:54 2002
@@ -101,8 +101,8 @@
typedef void *psaddr_t;
/* Register sets. Linux has different names. */
-typedef gregset_t prgregset_t;
-typedef fpregset_t prfpregset_t;
+typedef elf_gregset_t prgregset_t;
+typedef elf_fpregset_t prfpregset_t;
/* We don't have any differences between processes and threads,
therefore habe only ine PID type. */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-09-13 14:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-13 10:07 cannot debug multi-threaded programs with gdb Stuart Hughes
2002-09-13 13:51 ` Daniel Jacobowitz
2002-09-13 14:10 ` Stuart Hughes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox