From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16867 invoked by alias); 6 Feb 2014 20:56:15 -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 16799 invoked by uid 89); 6 Feb 2014 20:56:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 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 ESMTP; Thu, 06 Feb 2014 20:56:14 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s16KuB3c020358 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 Feb 2014 15:56:11 -0500 Received: from barimba.redhat.com (ovpn-113-148.phx2.redhat.com [10.3.113.148]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s16KtfZu013306; Thu, 6 Feb 2014 15:56:10 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFC v2 35/38] remove some calls to INHERIT and de_fault Date: Thu, 06 Feb 2014 20:56:00 -0000 Message-Id: <1391720136-2121-36-git-send-email-tromey@redhat.com> In-Reply-To: <1391720136-2121-1-git-send-email-tromey@redhat.com> References: <1391720136-2121-1-git-send-email-tromey@redhat.com> X-SW-Source: 2014-02/txt/msg00152.txt.bz2 This removes a few unnecessary calls to INHERIT and de_fault: * to_doc is only used when a target is registered * to_magic is only used when a target is pushed and not useful for current_target. * to_open and to_close are only ever called using a specific target_ops object; there is no need to de_fault them. 2014-02-06 Tom Tromey * target.c (update_current_target): Do not INHERIT to_doc or to_magic. Do not de_fault to_open or to_close. --- gdb/ChangeLog | 5 +++++ gdb/target.c | 8 -------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/gdb/target.c b/gdb/target.c index 8de7487..bded196 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -606,13 +606,11 @@ update_current_target (void) { INHERIT (to_shortname, t); INHERIT (to_longname, t); - INHERIT (to_doc, t); INHERIT (to_attach_no_wait, t); INHERIT (deprecated_xfer_memory, t); INHERIT (to_have_steppable_watchpoint, t); INHERIT (to_have_continuable_watchpoint, t); INHERIT (to_has_thread_control, t); - INHERIT (to_magic, t); } #undef INHERIT @@ -624,12 +622,6 @@ update_current_target (void) if (!current_target.field) \ current_target.field = value - de_fault (to_open, - (void (*) (char *, int)) - tcomplain); - de_fault (to_close, - (void (*) (struct target_ops *)) - target_ignore); de_fault (deprecated_xfer_memory, (int (*) (CORE_ADDR, gdb_byte *, int, int, struct mem_attrib *, struct target_ops *)) -- 1.8.1.4