This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Linux pthreads and gdb 5.0
- To: Fabrice Gautier <gautier at email dot enst dot fr>
- Subject: Re: Linux pthreads and gdb 5.0
- From: teg at redhat dot com (Trond Eivind Glomsrød)
- Date: 03 May 2001 11:40:46 -0400
- Cc: gdb at sources dot redhat dot com, bug-glibc at gnu dot org
- Organization: Red Hat, Inc.
- References: <20010503020528.2CA8.GAUTIER@email.enst.fr>
Fabrice Gautier <gautier@email.enst.fr> writes:
> Can't get gdb debug my multithread program with gdb 5.0.
Try a newer version of gdb... with Red Hat Linux 7.1, and a simple
test program, it seems to work:
[teg@halden teg]$ cat memtest.c
#include <malloc.h>
main()
{
char *foo = malloc(1);
memset(foo, 0, 2048);
}
[teg@halden teg]$ gcc memtest.c -o memtest -lefence -g
[teg@halden teg]$ gdb memtest
GNU gdb 5.0rh-8 Red Hat Linux 7.1
Copyright 2001 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 "i386-redhat-linux"...
(gdb) r
Starting program: /home/devel/teg/memtest
[New Thread 1024 (LWP 1598)]
Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com>
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 1598)]
0x400ba317 in memset () from /lib/i686/libc.so.6
(gdb) info thread
* 1 Thread 1024 (LWP 1598) 0x400ba317 in memset () from /lib/i686/libc.so.6
(gdb)
Glibc 2.2.3, gcc 2.96RH, gdb-5.0rh-5 (which is a snapshot from
mid-March), kernel-smp-2.4.3-2.14.14
--
Trond Eivind Glomsrød
Red Hat, Inc.