From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18609 invoked by alias); 13 Nov 2012 21:17:40 -0000 Received: (qmail 18595 invoked by uid 22791); 13 Nov 2012 21:17:39 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Nov 2012 21:17:31 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qADLHUus025199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 13 Nov 2012 16:17:30 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qADLHTjD001733 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 13 Nov 2012 16:17:29 -0500 From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: should deprecated_target_gdbarch_select_hack be un-deprecated? References: <20121109015149.13597.39322.stgit@brno.lan> <87lieaeisb.fsf@fleche.redhat.com> <509D4BCA.6020704@redhat.com> <87haoyeiev.fsf@fleche.redhat.com> <509D4FC9.2060208@redhat.com> <877gpuegsb.fsf@fleche.redhat.com> <509D5C1F.2010507@redhat.com> Date: Tue, 13 Nov 2012 21:17:00 -0000 In-Reply-To: <509D5C1F.2010507@redhat.com> (Pedro Alves's message of "Fri, 09 Nov 2012 19:40:15 +0000") Message-ID: <87haot5hjq.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 X-SW-Source: 2012-11/txt/msg00345.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Tom> Finally, I wonder whether deprecated_target_gdbarch_select_hack should Tom> be un-deprecated. [...] Pedro> Yes, I think so. We used to do nasty things with swapping out gdbarch's Pedro> fields, which I believe would be the gross "hack" part, but that is gone. How about this? I think my only real concern is the name I chose. Tom 2012-11-13 Tom Tromey * gdbarch.h, gdbarch.c: Rebuild. * gdbarch.sh (select_target_gdbarch): Rename from deprecated_target_gdbarch_select_hack. * arch-utils.c (gdbarch_update_p): Update. (set_gdbarch_from_file): Update. diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 71d17cf..c755d6d 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -522,7 +522,7 @@ gdbarch_update_p (struct gdbarch_info info) "New architecture %s (%s) selected\n", host_address_to_string (new_gdbarch), gdbarch_bfd_arch_info (new_gdbarch)->printable_name); - deprecated_target_gdbarch_select_hack (new_gdbarch); + select_target_gdbarch (new_gdbarch); return 1; } @@ -556,7 +556,7 @@ set_gdbarch_from_file (bfd *abfd) if (gdbarch == NULL) error (_("Architecture of file not recognized.")); - deprecated_target_gdbarch_select_hack (gdbarch); + select_target_gdbarch (gdbarch); } /* Initialize the current architecture. Update the ``set diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 26dd404..d119cc0 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -4666,7 +4666,7 @@ gdbarch_find_by_info (struct gdbarch_info info) /* Make the specified architecture current. */ void -deprecated_target_gdbarch_select_hack (struct gdbarch *new_gdbarch) +select_target_gdbarch (struct gdbarch *new_gdbarch) { gdb_assert (new_gdbarch != NULL); gdb_assert (new_gdbarch->initialized_p); diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 9d2bac3..0e17ad0 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1382,15 +1382,9 @@ extern int gdbarch_update_p (struct gdbarch_info info); extern struct gdbarch *gdbarch_find_by_info (struct gdbarch_info info); -/* Helper function. Set the global "target_gdbarch" to "gdbarch". +/* Helper function. Set the target gdbarch to "gdbarch". */ - FIXME: kettenis/20031124: Of the functions that follow, only - gdbarch_from_bfd is supposed to survive. The others will - dissappear since in the future GDB will (hopefully) be truly - multi-arch. However, for now we're still stuck with the concept of - a single active architecture. */ - -extern void deprecated_target_gdbarch_select_hack (struct gdbarch *gdbarch); +extern void select_target_gdbarch (struct gdbarch *gdbarch); /* Register per-architecture data-pointer. diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 53a52b1..c4ab43f 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -1331,15 +1331,9 @@ extern int gdbarch_update_p (struct gdbarch_info info); extern struct gdbarch *gdbarch_find_by_info (struct gdbarch_info info); -/* Helper function. Set the global "target_gdbarch" to "gdbarch". +/* Helper function. Set the target gdbarch to "gdbarch". */ - FIXME: kettenis/20031124: Of the functions that follow, only - gdbarch_from_bfd is supposed to survive. The others will - dissappear since in the future GDB will (hopefully) be truly - multi-arch. However, for now we're still stuck with the concept of - a single active architecture. */ - -extern void deprecated_target_gdbarch_select_hack (struct gdbarch *gdbarch); +extern void select_target_gdbarch (struct gdbarch *gdbarch); /* Register per-architecture data-pointer. @@ -2281,7 +2275,7 @@ gdbarch_find_by_info (struct gdbarch_info info) /* Make the specified architecture current. */ void -deprecated_target_gdbarch_select_hack (struct gdbarch *new_gdbarch) +select_target_gdbarch (struct gdbarch *new_gdbarch) { gdb_assert (new_gdbarch != NULL); gdb_assert (new_gdbarch->initialized_p);