From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18386 invoked by alias); 28 Aug 2007 18:06:51 -0000 Received: (qmail 18092 invoked by uid 22791); 28 Aug 2007 18:06:47 -0000 X-Spam-Check-By: sourceware.org Received: from sw1.lexmark.com (HELO sw1.lexmark.com) (192.146.101.70) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 28 Aug 2007 18:06:43 +0000 Message-ID: <46D462BD.2020201@lpdev.prtdev.lexmark.com> Date: Tue, 28 Aug 2007 18:06:00 -0000 From: John Breitenbach User-Agent: Thunderbird 1.5.0.10 (X11/20070221) MIME-Version: 1.0 To: gdb@sourceware.org Subject: gdb-6.6/ARM/static linking/pthreads Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-IsSubscribed: yes 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: 2007-08/txt/msg00239.txt.bz2 Hi, I've got a statically linked application with a dozen or so pthreads (nptl in glibc-2.3.6), and want to use gdb to debug it. With gdbserver, I attach to the specific thread id, and can set a breakpoint. However, if that breakpoint is hit by another of the pthreads, my kernel kills off all of them. We had some code in the linux kernel in the past which would insert and remove breakpoints on context switches, and I'd like to know if that needs to get propagated with our kernel upgrade (to 2.6.18) or is there a better way. Can gdbserver find out about the other threads, and handle the automatic continue if the SIGTRAP is for the wrong process. Or can I do something in the kernel to remove the breakpoint, single-step and restore the breakpoint in the case of the wrong process id? Thanks in advance for any advice John