From patchwork Tue Feb 28 14:50:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Rudo X-Patchwork-Id: 19403 Received: (qmail 17607 invoked by alias); 28 Feb 2017 14:50:35 -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 17453 invoked by uid 89); 28 Feb 2017 14:50:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 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=buttons, normal_stop, disconnect X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Feb 2017 14:50:31 +0000 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v1SEnFls168508 for ; Tue, 28 Feb 2017 09:50:30 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 28w9t6n9tn-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 28 Feb 2017 09:50:30 -0500 Received: from localhost by e06smtp13.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 d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 28 Feb 2017 14:50:26 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 7A8F21B0805F for ; Tue, 28 Feb 2017 14:53:28 +0000 (GMT) Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v1SEoQ9E66977942; Tue, 28 Feb 2017 14:50:26 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7C14152047; Tue, 28 Feb 2017 13:49:01 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 5C47D5204B; Tue, 28 Feb 2017 13:49:01 +0000 (GMT) From: Philipp Rudo To: gdb-patches@sourceware.org Cc: arnez@linux.vnet.ibm.com Subject: [PATCH 08/11] Remove unused deprecated_{attach|detach}_hook Date: Tue, 28 Feb 2017 15:50:13 +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-0012-0000-0000-000004D808C0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17022814-0013-0000-0000-0000176B23D9 Message-Id: <20170228145016.22604-9-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 these hooks anymore. So simply remove them. gdb/ChangeLog * defs.h (deprecated_attach_hook, deprecated_detach_hook): Remove. * top.c (deprecated_attach_hook, deprecated_detach_hook): Remove. * infcmd.c (attach_post_wait, detach_command) (disconnect_command): Adjust. * target.c (generic_mourn_inferior): Adjust. --- gdb/defs.h | 2 -- gdb/infcmd.c | 7 ------- gdb/target.c | 3 --- gdb/top.c | 6 ------ 4 files changed, 18 deletions(-) diff --git a/gdb/defs.h b/gdb/defs.h index 3c97825..a52db88 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -672,8 +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 void (*deprecated_attach_hook) (void); -extern void (*deprecated_detach_hook) (void); extern void (*deprecated_call_command_hook) (struct cmd_list_element * c, char *cmd, int from_tty); diff --git a/gdb/infcmd.c b/gdb/infcmd.c index d836162..93d8c3e 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -2752,8 +2752,6 @@ attach_post_wait (char *args, int from_tty, enum attach_post_wait_mode mode) /* Tell the user/frontend where we're stopped. */ normal_stop (); - if (deprecated_attach_hook) - deprecated_attach_hook (); } } @@ -3008,9 +3006,6 @@ detach_command (char *args, int from_tty) threads. */ if (!have_inferiors ()) init_thread_list (); - - if (deprecated_detach_hook) - deprecated_detach_hook (); } /* Disconnect from the current target without resuming it (leaving it @@ -3030,8 +3025,6 @@ disconnect_command (char *args, int from_tty) target_disconnect (args, from_tty); no_shared_libraries (NULL, from_tty); init_thread_list (); - if (deprecated_detach_hook) - deprecated_detach_hook (); } void diff --git a/gdb/target.c b/gdb/target.c index 0ff8515..3820fb7 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3336,9 +3336,6 @@ generic_mourn_inferior (void) reopen_exec_file (); reinit_frame_cache (); - - if (deprecated_detach_hook) - deprecated_detach_hook (); } /* Convert a normal process ID to a string. Returns the string in a diff --git a/gdb/top.c b/gdb/top.c index 0ddef13..e33caf4 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -194,12 +194,6 @@ void (*deprecated_print_frame_info_listing_hook) (struct symtab * s, int (*deprecated_query_hook) (const char *, va_list); -/* Called as appropriate to notify the interface that we have attached - to or detached from an already running process. */ - -void (*deprecated_attach_hook) (void); -void (*deprecated_detach_hook) (void); - /* Used by UI as a wrapper around command execution. May do various things like enabling/disabling buttons, etc... */