From patchwork Fri Mar 18 19:18:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 11393 Received: (qmail 84110 invoked by alias); 18 Mar 2016 19:19:13 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 83968 invoked by uid 89); 18 Mar 2016 19:19:12 -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=beneath, COMMAND 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:19:06 +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 D2A09C003592 for ; Fri, 18 Mar 2016 19:19:00 +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 u2IJIYkS028091 for ; Fri, 18 Mar 2016 15:19:00 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 30/30] Eliminate target_check_pending_interrupt Date: Fri, 18 Mar 2016 19:18:34 +0000 Message-Id: <1458328714-4938-31-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> This is no longer called anywhere. gdb/ChangeLog: yyyy-mm-dd Pedro Alves * target.c (target_check_pending_interrupt): Delete. * target.h (struct target_ops) : Remove method. (target_check_pending_interrupt): Remove declaration. * target-delegates.c: Regenerate. --- gdb/target-delegates.c | 26 -------------------------- gdb/target.c | 8 -------- gdb/target.h | 10 ---------- 3 files changed, 44 deletions(-) diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 640803a..03aa2cc 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -1625,28 +1625,6 @@ debug_pass_ctrlc (struct target_ops *self) } static void -delegate_check_pending_interrupt (struct target_ops *self) -{ - self = self->beneath; - self->to_check_pending_interrupt (self); -} - -static void -tdefault_check_pending_interrupt (struct target_ops *self) -{ -} - -static void -debug_check_pending_interrupt (struct target_ops *self) -{ - fprintf_unfiltered (gdb_stdlog, "-> %s->to_check_pending_interrupt (...)\n", debug_target.to_shortname); - debug_target.to_check_pending_interrupt (&debug_target); - fprintf_unfiltered (gdb_stdlog, "<- %s->to_check_pending_interrupt (", debug_target.to_shortname); - target_debug_print_struct_target_ops_p (&debug_target); - fputs_unfiltered (")\n", gdb_stdlog); -} - -static void delegate_rcmd (struct target_ops *self, const char *arg1, struct ui_file *arg2) { self = self->beneath; @@ -4213,8 +4191,6 @@ install_delegators (struct target_ops *ops) ops->to_interrupt = delegate_interrupt; if (ops->to_pass_ctrlc == NULL) ops->to_pass_ctrlc = delegate_pass_ctrlc; - if (ops->to_check_pending_interrupt == NULL) - ops->to_check_pending_interrupt = delegate_check_pending_interrupt; if (ops->to_rcmd == NULL) ops->to_rcmd = delegate_rcmd; if (ops->to_pid_to_exec_file == NULL) @@ -4462,7 +4438,6 @@ install_dummy_methods (struct target_ops *ops) ops->to_stop = tdefault_stop; ops->to_interrupt = tdefault_interrupt; ops->to_pass_ctrlc = default_target_pass_ctrlc; - ops->to_check_pending_interrupt = tdefault_check_pending_interrupt; ops->to_rcmd = default_rcmd; ops->to_pid_to_exec_file = tdefault_pid_to_exec_file; ops->to_log_command = tdefault_log_command; @@ -4619,7 +4594,6 @@ init_debug_target (struct target_ops *ops) ops->to_stop = debug_stop; ops->to_interrupt = debug_interrupt; ops->to_pass_ctrlc = debug_pass_ctrlc; - ops->to_check_pending_interrupt = debug_check_pending_interrupt; ops->to_rcmd = debug_rcmd; ops->to_pid_to_exec_file = debug_pid_to_exec_file; ops->to_log_command = debug_log_command; diff --git a/gdb/target.c b/gdb/target.c index d580983..a9744c4 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3378,14 +3378,6 @@ default_target_pass_ctrlc (struct target_ops *ops) target_interrupt (inferior_ptid); } -/* See target.h. */ - -void -target_check_pending_interrupt (void) -{ - (*current_target.to_check_pending_interrupt) (¤t_target); -} - /* See target/target.h. */ void diff --git a/gdb/target.h b/gdb/target.h index 00625fec..6b5b6e0 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -647,8 +647,6 @@ struct target_ops TARGET_DEFAULT_IGNORE (); void (*to_pass_ctrlc) (struct target_ops *) TARGET_DEFAULT_FUNC (default_target_pass_ctrlc); - void (*to_check_pending_interrupt) (struct target_ops *) - TARGET_DEFAULT_IGNORE (); void (*to_rcmd) (struct target_ops *, const char *command, struct ui_file *output) TARGET_DEFAULT_FUNC (default_rcmd); @@ -1729,14 +1727,6 @@ extern void target_pass_ctrlc (void); target_interrupt. */ extern void default_target_pass_ctrlc (struct target_ops *ops); -/* Some targets install their own SIGINT handler while the target is - running. This method is called from the QUIT macro to give such - targets a chance to process a Ctrl-C. The target may e.g., choose - to interrupt the (potentially) long running operation, or give up - waiting and disconnect. */ - -extern void target_check_pending_interrupt (void); - /* Send the specified COMMAND to the target's monitor (shell,interpreter) for execution. The result of the query is placed in OUTBUF. */