bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linux pthreads and gdb 5.0


From: Trond Eivind Glomsrød
Subject: Re: Linux pthreads and gdb 5.0
Date: 03 May 2001 11:40:46 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.102

Fabrice Gautier <address@hidden> 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:

address@hidden teg]$ cat memtest.c 
#include <malloc.h>

main()
{
  char *foo = malloc(1);
  memset(foo, 0, 2048);
}

address@hidden teg]$ gcc memtest.c -o memtest -lefence -g
address@hidden 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 <address@hidden>

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]