From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24294 invoked by alias); 20 Jul 2009 13:34:33 -0000 Received: (qmail 24286 invoked by uid 22791); 20 Jul 2009 13:34:32 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Jul 2009 13:34:21 +0000 Received: (qmail 32192 invoked from network); 20 Jul 2009 13:34:18 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 Jul 2009 13:34:18 -0000 From: Pedro Alves To: "Ulrich Weigand" Subject: Re: [rfc] Fix register cache invalidation Date: Mon, 20 Jul 2009 13:58:00 -0000 User-Agent: KMail/1.9.10 Cc: gdb-patches@sourceware.org References: <200907141459.n6EExSxC004676@d12av02.megacenter.de.ibm.com> In-Reply-To: <200907141459.n6EExSxC004676@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907201435.07453.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00475.txt.bz2 On Tuesday 14 July 2009 15:59:28, Ulrich Weigand wrote: > when testing the Cell/B.E. combined debugger patches I ran into a situation > where registers_changed was not called soon enough. > > A while ago I proposed a patch to simplify register invalidation (as part of > a infrun cleanup series): > http://sourceware.org/ml/gdb-patches/2008-12/msg00120.html > This cleanup actually fixes the combined debugger problem as well. Curious. Are we sure we're not hidding some other bug then? > At the time, Pedro pointed out that parts of that patch weren't safe in the > non-stop case. The version below omits those parts, and only changes code > to simplify calling registers_changed and resetting waiton_ptid. > Tested on powerpc64-linux with no regressions. > Any comments? I'd like to commit this in a couple of days. I like it! > > (fetch_inferior_event): Remove check for always-true condition. > > - /* We can only rely on wait_for_more being correct before handling > - the event in all-stop, but previous_inferior_ptid isn't used in > - non-stop. */ > - if (!ecs->wait_some_more) > - /* We'll update this if & when we switch to a new thread. */ > - previous_inferior_ptid = inferior_ptid; > + /* We'll update this if & when we switch to a new thread. */ > + previous_inferior_ptid = inferior_ptid; This is actually a bug in the async/all-stop (you're not introducing it, it's already there). We shouldn't be clobbering previous_inferior_ptid on every internaly handled event. Just noting it --- don't worry about it. -- Pedro Alves