From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81318 invoked by alias); 18 Mar 2016 19:27:52 -0000 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 Received: (qmail 80654 invoked by uid 89); 18 Mar 2016 19:27:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=stolen, 955,7, 9557 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 18 Mar 2016 19:27:50 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 2E5A364468 for ; Fri, 18 Mar 2016 19:18:45 +0000 (UTC) Received: from cascais.lan (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2IJIYk9028091 for ; Fri, 18 Mar 2016 15:18:44 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 11/30] Don't call clear_quit_flag after check_quit_flag Date: Fri, 18 Mar 2016 19:28:00 -0000 Message-Id: <1458328714-4938-12-git-send-email-palves@redhat.com> In-Reply-To: <1458328714-4938-1-git-send-email-palves@redhat.com> References: <1458328714-4938-1-git-send-email-palves@redhat.com> X-SW-Source: 2016-03/txt/msg00373.txt.bz2 Obviously not necessary since check_quit_flag clears the flag as side effect. gdb/ChangeLog: yyyy-mm-dd Pedro Alves * remote-sim.c (gdb_os_poll_quit): Don't call clear_quit_flag. * remote.c (remote_wait_as): Don't call clear_quit_flag. --- gdb/remote-sim.c | 5 +---- gdb/remote.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index 8489eb6..11d36eb 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -955,10 +955,7 @@ gdb_os_poll_quit (host_callback *p) deprecated_ui_loop_hook (0); if (check_quit_flag ()) /* gdb's idea of quit */ - { - clear_quit_flag (); /* we've stolen it */ - return 1; - } + return 1; return 0; } diff --git a/gdb/remote.c b/gdb/remote.c index af0a08a..d43293b 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -6935,10 +6935,7 @@ remote_wait_as (ptid_t ptid, struct target_waitstatus *status, int options) /* If the user hit C-c before this packet, or between packets, pretend that it was hit right here. */ if (check_quit_flag ()) - { - clear_quit_flag (); - sync_remote_interrupt (SIGINT); - } + sync_remote_interrupt (SIGINT); } /* FIXME: cagney/1999-09-27: If we're in async mode we should -- 2.5.0