From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2313 invoked by alias); 29 Nov 2006 18:21:39 -0000 Received: (qmail 2299 invoked by uid 22791); 29 Nov 2006 18:21:37 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate3.de.ibm.com (HELO mtagate3.de.ibm.com) (195.212.29.152) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 29 Nov 2006 18:21:24 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate3.de.ibm.com (8.13.8/8.13.8) with ESMTP id kATILGUt162688 for ; Wed, 29 Nov 2006 18:21:19 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id kATIOsvl3268842 for ; Wed, 29 Nov 2006 19:24:54 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id kATILES1002988 for ; Wed, 29 Nov 2006 19:21:14 +0100 Received: from [9.152.248.39] (dyn-9-152-248-39.boeblingen.de.ibm.com [9.152.248.39]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id kATILDaO002982 for ; Wed, 29 Nov 2006 19:21:14 +0100 Message-ID: <456DCF95.7010509@de.ibm.com> Date: Wed, 29 Nov 2006 18:21:00 -0000 From: Markus Deuling User-Agent: Thunderbird 1.5.0.8 (X11/20061107) MIME-Version: 1.0 To: GDB Discuss Subject: Bug#2199: Problem in gdb-6.5 (remote) while stepping over pthread_create() on x86 and powerpc Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00233.txt.bz2 Hello, I found a bug in gdb and opened a bug report on http://sources.redhat.com/cgi-bin/gnatsweb.pl?database=gdb (Bug #2199) I found the bug when stepping over pthread_create(). The 'next' over pthread_create() looses its breakpoint after returning. This only seems to occur if the new Thread uses a shared library using dlopen()/dlsym(). This appears both on x86 and powerpc while remote debugging. I added a testcases to the bug report which shows this result. Here is a dump of the gdb session on powerpc. I used gdb-6.5 vanilla: (gdb) target remote :1111 Remote debugging using :1111 0x0ffd60f0 in ?? () (gdb) br main Breakpoint 1 at 0x10000684: file main.c, line 16. (gdb) c Continuing. [New thread 6635] [Switching to thread 6635] Breakpoint 1, main () at main.c:16 16 for (cnt = 0; cnt < max_nr; cnt++) (gdb) n 18 val = pthread_create (&thread_id[cnt], NULL, &test, NULL); (gdb) [New thread 6636] [New thread 6638] [New thread 6639] Program exited normally. (gdb) Here you can see that gdb doesn't stop after next'ing over the first pthread_create() as it should. This is reproducible on x86. Has someone an idea what went wrong ? Regards, Markus -- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com