From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8401 invoked by alias); 5 Sep 2011 15:57:11 -0000 Received: (qmail 8392 invoked by uid 22791); 5 Sep 2011 15:57:10 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 05 Sep 2011 15:56:56 +0000 Received: (qmail 23622 invoked from network); 5 Sep 2011 15:56:55 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 5 Sep 2011 15:56:55 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: PR cli/13110 Date: Mon, 05 Sep 2011 16:50:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.0; x86_64; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201109051656.53563.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: 2011-09/txt/msg00082.txt.bz2 Tested on x86_64-linux and applied. Repeating what I said on gdb@, I'm now wondering if we actually ever need the registers_changed call here or in wait_for_inferior nowadays --- we flush threads' register caches when we resume them (target_resume). -- Pedro Alves 2011-09-05 Pedro Alves PR cli/13110 gdb/ * infrun.c (fetch_inferior_event): Check if there's a selected thread before checking if the selected thread is executing. --- gdb/infrun.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Index: src/gdb/infrun.c =================================================================== --- src.orig/gdb/infrun.c 2011-09-05 15:50:49.000000000 +0100 +++ src/gdb/infrun.c 2011-09-05 15:57:10.693964411 +0100 @@ -2749,7 +2749,9 @@ fetch_inferior_event (void *client_data) switches threads anyway). If we didn't do this, a spurious delayed event in all-stop mode would make the user lose the selected frame. */ - if (non_stop || is_executing (inferior_ptid)) + if (non_stop + || (!ptid_equal (inferior_ptid, null_ptid) + && is_executing (inferior_ptid))) registers_changed (); make_cleanup_restore_integer (&execution_direction);