From owner-freebsd-ppc@FreeBSD.ORG Mon May 4 10:40:09 2009 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C088106564A for ; Mon, 4 May 2009 10:40:09 +0000 (UTC) (envelope-from gjb@semihalf.com) Received: from semihalf.com (semihalf.com [206.130.101.55]) by mx1.freebsd.org (Postfix) with ESMTP id 2E4078FC1B for ; Mon, 4 May 2009 10:40:09 +0000 (UTC) (envelope-from gjb@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by semihalf.com (8.13.1/8.13.1) with ESMTP id n44APivu031220; Mon, 4 May 2009 04:25:45 -0600 Message-ID: <49FEC2C3.3040304@semihalf.com> Date: Mon, 04 May 2009 12:26:11 +0200 From: Grzegorz Bernacki MIME-Version: 1.0 To: xcllnt@mac.com References: <9904FBD1-F01A-4E7C-9E71-6C2D544352F8@mac.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: Fwd: Single stepping through atomic ops X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 10:40:09 -0000 The fix was merged into gdb source about two years ago (2007-04-12). I can find it in gdb version 6.8. According to gdb release schedule version 6.7 release date is 2007-10-10, so probably this fix is also in version 6.7, but I haven't checked it. regards, Grzesiek > >> From: Marcel Moolenaar >> Date: 1 maja 2009 03:09:59 GMT+02:00 >> To: Rafal Jaworowski >> Cc: "freebsd-ppc@freebsd.org" >> Subject: Re: Single stepping through atomic ops >> >> Sorry for the delay... >> There's an effort to import GDB 6.4 I think. What's the version of GDB >> that is fixed? >> >> >> --Marcel >> >> On Apr 30, 2009, at 2:01 AM, Rafal Jaworowski wrote: >> >>> >>> On 2009-04-21, at 19:57, Rafal Jaworowski wrote: >>> >>>> Hi Marcel, >>>> I'm writing to you primarily as the gdb maintainer :-) There's a >>>> problem with current gdb in base when single stepping through atomic >>>> sequences on PowerPC (and presumably other archs with the load + >>>> conditional store approach for atomic ops). The effect is a hang >>>> because we endlessly loop due to the [always] lost reservation at >>>> the time of a closing stwcx. >>>> >>>> This is a known problem with gdb and it's fixed with newer versions, >>>> but the patches are not applicable to our gdb due to some >>>> infrastructure changes. The quick fix for 6.1.1 is here: >>>> http://people.freebsd.org/~raj/patches/powerpc/gdb-ppc-single-step.diff >>>> >>>> It's mainly a transplant of two fixes from the gdb repository >>>> (1.275, 1.276, deal_with_atomic_sequence) adjusted to our older gdb >>>> code, but it's ugly #ifdef'ed __ppc__. In order to do it cleanly we >>>> would need to change the signature of the SOFTWARE_SINGLE_STEP >>>> method so it returns a value (this is how newer gdb works), but it >>>> would affect gdb for all architectures. Do you see any objections >>>> for growing a return value here? >>>> >>>> Another direction would be importing a newer gdb code base, and be >>>> able to apply the fixes directly and cleanly (if at all required), >>>> but am not sure if there are any plans to upgrade gdb in base? Let >>>> me know your comments. >>> >>> Have you got any comments to this? Should I move on and commit this >>> as ugly as is, or would reworking SOFTWARE_SINGLE_STEP be more >>> desired? Any thoughts about newer gdb versions coming to the tree? >>> >>> Rafal >>> >