From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4188 invoked by alias); 24 Oct 2006 18:29:45 -0000 Received: (qmail 4177 invoked by uid 22791); 24 Oct 2006 18:29:44 -0000 X-Spam-Check-By: sourceware.org Received: from www.osadl.org (HELO mail.tglx.de) (213.239.205.134) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 24 Oct 2006 18:29:36 +0000 Received: from hermes.tec.linutronix.de (unknown [192.168.0.1]) by mail.tglx.de (Postfix) with ESMTP id C842665C003 for ; Tue, 24 Oct 2006 20:29:33 +0200 (CEST) Received: from localhost.localdomain (atlas.tec.linutronix.de [192.168.0.87]) by hermes.tec.linutronix.de (Postfix) with SMTP id 4F1DD67FA0 for ; Tue, 24 Oct 2006 20:29:33 +0200 (CEST) Date: Tue, 24 Oct 2006 18:29:00 -0000 From: Benedikt Spranger To: gdb@sourceware.org Subject: thread-debuging with gdbserver on ARM/NPTL Message-Id: <20061024202933.1d5129b9.b.spranger@linutronix.de> X-Mailer: Sylpheed version 2.3.0beta1 (GTK+ 2.10.6; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00230.txt.bz2 Hi, trying to debug a simple multithreaded application with gdbserver on an ARM eabi/NPTL based System leads to a completely confused gdbserver. thread_code() { BP2 do_thread_init(); pthread_lock(); do_thread_work(); pthread_unlock(); } main() { pthread_lock() pthread_create() BP1 do_something() pthread_unlock() } Attaching gdb to gdbserver, set the above breakpoints and issue "cont", then the program stops at breakpoint BP1. BP2 is never reached, although the thread is visible via "ps" on the target system. The thread is stuck in sys_futex and not as expected in the ptrace breakpoint trap. Also gdb does not show that the thread was created. This can be reproduced with glibc 2.3.6 -> 2.5, kernel 2.6.14 -> 2.6.19-rc2, gcc 3.4 -> 4.1.1 and binutils up to cvs-latest. Benedikt Spranger