From patchwork Tue Feb 28 14:50:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Rudo X-Patchwork-Id: 19408 Received: (qmail 110912 invoked by alias); 28 Feb 2017 19:45:23 -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 110870 invoked by uid 89); 28 Feb 2017 19:45:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KHOP_DYNAMIC, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=20013 X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Feb 2017 19:45:16 +0000 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v1SEmUPW145682 for ; Tue, 28 Feb 2017 09:50:31 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 28vpwfy89p-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 28 Feb 2017 09:50:30 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 28 Feb 2017 14:50:28 -0000 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 28 Feb 2017 14:50:25 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 4F9EF17D8062 for ; Tue, 28 Feb 2017 14:53:38 +0000 (GMT) Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v1SEoPSp12517708; Tue, 28 Feb 2017 14:50:25 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 525625204E; Tue, 28 Feb 2017 13:49:00 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 3CBBA52057; Tue, 28 Feb 2017 13:49:00 +0000 (GMT) From: Philipp Rudo To: gdb-patches@sourceware.org Cc: arnez@linux.vnet.ibm.com Subject: [PATCH 07/11] Remove unused deprecated_target_wait_hook Date: Tue, 28 Feb 2017 15:50:12 +0100 In-Reply-To: <20170228145016.22604-1-prudo@linux.vnet.ibm.com> References: <20170228145016.22604-1-prudo@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17022814-0020-0000-0000-0000027E106F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17022814-0021-0000-0000-00001F8B3BF8 Message-Id: <20170228145016.22604-8-prudo@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-28_13:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702280136 X-IsSubscribed: yes Nobody actually uses this hook anymore. So simply remove it. gdb/ChangeLog * defs.h (deprecated_target_wait_hook): Remove. * top.c (deprecated_target_wait_hook): Remove. * interps.c (clear_interpreter_hooks): Adjust. * infrun.c (get_last_target_status): Adjust comment. (do_target_wait, wait_one): Adjust. --- gdb/defs.h | 4 ---- gdb/infrun.c | 23 ++++++----------------- gdb/interps.c | 1 - gdb/top.c | 7 ------- 4 files changed, 6 insertions(+), 29 deletions(-) diff --git a/gdb/defs.h b/gdb/defs.h index 6133eb9..3c97825 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -672,10 +672,6 @@ extern void (*deprecated_print_frame_info_listing_hook) (struct symtab * s, int noerror); extern int (*deprecated_query_hook) (const char *, va_list) ATTRIBUTE_FPTR_PRINTF(1,0); -extern ptid_t (*deprecated_target_wait_hook) (ptid_t ptid, - struct target_waitstatus *status, - int options); - extern void (*deprecated_attach_hook) (void); extern void (*deprecated_detach_hook) (void); extern void (*deprecated_call_command_hook) (struct cmd_list_element * c, diff --git a/gdb/infrun.c b/gdb/infrun.c index 2085c94..104c91b 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -389,8 +389,8 @@ show_stop_on_solib_events (struct ui_file *file, int from_tty, static int stop_print_frame; /* This is a cached copy of the pid/waitstatus of the last event - returned by target_wait()/deprecated_target_wait_hook(). This - information is returned by get_last_target_status(). */ + returned by target_wait(). This information is returned by + get_last_target_status(). */ static ptid_t target_last_wait_ptid; static struct target_waitstatus target_last_waitstatus; @@ -3514,7 +3514,6 @@ random_pending_event_thread (ptid_t waiton_ptid) static ptid_t do_target_wait (ptid_t ptid, struct target_waitstatus *status, int options) { - ptid_t event_ptid; struct thread_info *tp; /* First check if there is a resumed thread with a wait status @@ -3630,13 +3629,7 @@ do_target_wait (ptid_t ptid, struct target_waitstatus *status, int options) } /* But if we don't find one, we'll have to wait. */ - - if (deprecated_target_wait_hook) - event_ptid = deprecated_target_wait_hook (ptid, status, options); - else - event_ptid = target_wait (ptid, status, options); - - return event_ptid; + return target_wait (ptid, status, options); } /* Prepare and stabilize the inferior for detaching it. E.g., @@ -4050,9 +4043,8 @@ set_last_target_status (ptid_t ptid, struct target_waitstatus status) } /* Return the cached copy of the last pid/waitstatus returned by - target_wait()/deprecated_target_wait_hook(). The data is actually - cached by handle_inferior_event(), which gets called immediately - after target_wait()/deprecated_target_wait_hook(). */ + target_wait(). The data is actually cached by handle_inferior_event(), + which gets called immediately after target_wait(). */ void get_last_target_status (ptid_t *ptidp, struct target_waitstatus *status) @@ -4341,10 +4333,7 @@ wait_one (struct target_waitstatus *ws) don't get any event. */ target_dcache_invalidate (); - if (deprecated_target_wait_hook) - event_ptid = deprecated_target_wait_hook (wait_ptid, ws, 0); - else - event_ptid = target_wait (wait_ptid, ws, 0); + event_ptid = target_wait (wait_ptid, ws, 0); if (debug_infrun) print_target_wait_results (wait_ptid, event_ptid, ws); diff --git a/gdb/interps.c b/gdb/interps.c index 8f122c5..4cc9ae5 100644 --- a/gdb/interps.c +++ b/gdb/interps.c @@ -391,7 +391,6 @@ clear_interpreter_hooks (void) deprecated_print_frame_info_listing_hook = 0; /*print_frame_more_info_hook = 0; */ deprecated_query_hook = 0; - deprecated_target_wait_hook = 0; deprecated_call_command_hook = 0; deprecated_error_begin_hook = 0; } diff --git a/gdb/top.c b/gdb/top.c index cc5df78..0ddef13 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -200,13 +200,6 @@ int (*deprecated_query_hook) (const char *, va_list); void (*deprecated_attach_hook) (void); void (*deprecated_detach_hook) (void); -/* Called when going to wait for the target. Usually allows the GUI - to run while waiting for target events. */ - -ptid_t (*deprecated_target_wait_hook) (ptid_t ptid, - struct target_waitstatus *status, - int options); - /* Used by UI as a wrapper around command execution. May do various things like enabling/disabling buttons, etc... */