Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: should deprecated_target_gdbarch_select_hack be un-deprecated?
Date: Wed, 14 Nov 2012 15:34:00 -0000	[thread overview]
Message-ID: <877gpo42ra.fsf@fleche.redhat.com> (raw)
In-Reply-To: <50A3A28C.206@redhat.com> (Pedro Alves's message of "Wed, 14 Nov	2012 13:54:20 +0000")

>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> This is fine with me.  My alternative suggestion would be
Pedro> "set_target_gdbarch", as "set" is more traditional for a setter,
Pedro> which is what this function ended up being.

Sounds good.  Here is what I am checking in.

Tom

2012-11-13  Tom Tromey  <tromey@redhat.com>

	* gdbarch.h, gdbarch.c: Rebuild.
	* gdbarch.sh (set_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..5a47e37 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);
+  set_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);
+  set_target_gdbarch (gdbarch);
 }
 
 /* Initialize the current architecture.  Update the ``set
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 26dd404..09576b1 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)
+set_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..df09553 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 set_target_gdbarch (struct gdbarch *gdbarch);
 
 
 /* Register per-architecture data-pointer.
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 53a52b1..4b11f92 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 set_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)
+set_target_gdbarch (struct gdbarch *new_gdbarch)
 {
   gdb_assert (new_gdbarch != NULL);
   gdb_assert (new_gdbarch->initialized_p);


  reply	other threads:[~2012-11-14 15:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-09  1:52 [PATCH] Multi-process + multi-arch: GDB Pedro Alves
2012-11-09  5:26 ` H.J. Lu
2012-11-09 10:07   ` Pedro Alves
2012-11-09 18:24 ` Tom Tromey
2012-11-09 18:30   ` Pedro Alves
2012-11-09 18:32     ` Tom Tromey
2012-11-09 18:47       ` Pedro Alves
2012-11-09 19:08         ` Tom Tromey
2012-11-09 19:14           ` Pedro Alves
2012-11-09 19:18             ` Tom Tromey
2012-11-09 19:40           ` should deprecated_target_gdbarch_select_hack be un-deprecated? Pedro Alves
2012-11-13 21:17             ` Tom Tromey
2012-11-14 13:54               ` Pedro Alves
2012-11-14 15:34                 ` Tom Tromey [this message]
2012-11-10 16:25           ` [PATCH] Multi-process + multi-arch: GDB Michael Eager
2012-11-13 20:50             ` Tom Tromey
2012-11-14 13:48               ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877gpo42ra.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox