From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1160 invoked by alias); 18 Aug 2008 18:47:54 -0000 Received: (qmail 1149 invoked by uid 22791); 18 Aug 2008 18:47:54 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 18 Aug 2008 18:47:07 +0000 Received: (qmail 15758 invoked from network); 18 Aug 2008 18:47:05 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 18 Aug 2008 18:47:05 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: Spurious SIGTRAP reported by GDB 6.8 when debugging embedded RTOS application Date: Wed, 20 Aug 2008 14:37:00 -0000 User-Agent: KMail/1.9.9 Cc: Antony KING , Ulrich Weigand References: <200808181815.m7IIFNSo006641@d12av02.megacenter.de.ibm.com> <48A9C07E.2050504@st.com> In-Reply-To: <48A9C07E.2050504@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808181947.46104.pedro@codesourcery.com> 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: 2008-08/txt/msg00224.txt.bz2 On Monday 18 August 2008 19:33:34, Antony KING wrote: > Thanks for the definition. I had not fully grasped this aspect of the > target_resume interface. For my target interface only mode (1) can be > properly supported. Modes (2) and (4) cannot be supported at all and > mode (3) can only be supported by ensuring that inferior_ptid is set to > the last stopped thread before commencing stepping. > > [Actually mode (4) can be supported but only if ptid == last stopped > thread, but this is the similar to supporting mode (3).] > In your original example, would it work to put a special "switch-thread breakpoint" at the PC of thread 7, so it forces a thread switch on your target, and then continue hardware single-stepping from there when it is hit? With care, it seems this could be hidden entirelly on the stub/target side. (I'm still curious on how this worked on 6.7.1 though) -- Pedro Alves