From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11712 invoked by alias); 17 Mar 2005 22:19: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 11491 invoked from network); 17 Mar 2005 22:19:03 -0000 Received: from unknown (HELO smtp.discreet.com) (207.35.253.199) by sourceware.org with SMTP; 17 Mar 2005 22:19:03 -0000 Received: from cuba.discreet.qc.ca (cuba.discreet.qc.ca [172.16.50.110]) by cuba.discreet.qc.casmtp.discreet.com (8.12.9/8.12.9) with ESMTP id j2HNInHa023257 for ; Thu, 17 Mar 2005 18:18:49 -0500 Received: from oshawa.rd.discreet.qc.ca (oshawa.rd.discreet.qc.ca [172.16.128.95]) by cuba.discreet.qc.ca (SGI-8.12.5/8.12.5) with ESMTP id j2HMIte03603183 for ; Thu, 17 Mar 2005 17:18:57 -0500 (EST) Received: from oshawa.rd.discreet.qc.ca (localhost [127.0.0.1]) by oshawa.rd.discreet.qc.ca (8.12.11/8.12.11) with ESMTP id j2HMItg0024908 for ; Thu, 17 Mar 2005 17:18:55 -0500 Received: (from desjare@localhost) by oshawa.rd.discreet.qc.ca (8.12.11/8.12.11/Submit) id j2HMIrst024905 for gdb@sources.redhat.com; Thu, 17 Mar 2005 17:18:53 -0500 X-Authentication-Warning: oshawa.rd.discreet.qc.ca: desjare set sender to eric.desjardins@discreet.com using -f Subject: Re: unable to debug statically linked program with linux threads From: Eric Desjardins To: gdb@sources.redhat.com In-Reply-To: <1111097217.25342@horse.he.net> References: <1111097217.25342@horse.he.net> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1111097932.4593.12.camel@oshawa.rd.discreet.qc.ca> Mime-Version: 1.0 Date: Thu, 17 Mar 2005 22:19:00 -0000 X-SW-Source: 2005-03/txt/msg00176.txt.bz2 Hi, I got this problem too but I use dynamic linking and I run without LD_ASSUME_KERNEL 2.4.19 env variable set (using NTPL support). If you do not use NTPL support, you won't have this problem. Normally when you get a sig32 signal, your thread is doing something and is interrupted. For example, suppose your thread is waiting on a select call and the thread is destroyed, the thread will receive a sig32 signal. I assume this should not be happening and usually considers that as a bug. In your case, the sleep command on your thread is interrupted so I guess this is why you receive this signal. Have you tried setting a signal handler? Eric On Thu, 2005-03-17 at 17:06, Ajay Patel wrote: > Hi, > I have a FC3 based i686 machine with gdb version 6.1. > I got a simple threaded program from one BSD. (program attached) > > With dynamic linking (linux threads), I can run > the program under gdb without a problem. > All thread related commands seems to work properly. > > With static linking, when I run this program under > gdb, first I get > "Program received signal SIG32/SIG33 Real-time event 32/32". > I avoid this problem by > "handle SIG32/SIG33 pass nostop noprint". > > However none of the thread related command works. > > Any suggestion? > > Thanks > Ajay > > /**************************************************************************** > * > * Simple diff mode test. > * > * $FreeBSD: src/lib/libpthread/test/hello_d.c,v 1.1 2000/04/24 21:07:37 > jasone Exp $ > * > ****************************************************************************/ > > #include > #include > #include > > void * > entry1(void * a_arg) > { > fprintf(stderr, "Hello world1\n"); > > sleep(100); > } > > void * > entry2(void * a_arg) > { > fprintf(stderr, "Hello world2\n"); > > sleep(100); > } > int > main() > { > pthread_t thread1, thread2; > int error; > > error = pthread_create(&thread1, NULL, entry1, NULL); > if (error) > fprintf(stderr, "Error in pthread_create(): %s\n", > strerror(error)); > > error = pthread_create(&thread2, NULL, entry2, NULL); > if (error) > fprintf(stderr, "Error in pthread_create(): %s\n", > strerror(error)); > > error = pthread_join(thread1, NULL); > if (error) > fprintf(stderr, "Error in pthread_join(): %s\n", > strerror(error)); > error = pthread_join(thread2, NULL); > if (error) > fprintf(stderr, "Error in pthread_join(): %s\n", > strerror(error)); > > return 0; > }