aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-11-10 19:20:37 +0000
committerDaniel Jacobowitz <drow@false.org>2006-11-10 19:20:37 +0000
commit7a10774786f11bc9608da206f79d7d546d5685bb (patch)
treee7e1cb91283664c7d25a8add96ff9381b967343a /gdb/gdbarch.c
parentd8295fe954b3f129fe3439aa17bb2c2be45d264c (diff)
downloadgdb-7a10774786f11bc9608da206f79d7d546d5685bb.zip
gdb-7a10774786f11bc9608da206f79d7d546d5685bb.tar.gz
gdb-7a10774786f11bc9608da206f79d7d546d5685bb.tar.bz2
gdb/
* arch-utils.c (target_byte_order_user): Renamed from target_byte_order. (target_byte_order_auto, selected_byte_order): Removed. (show_endian): Check target_byte_order_user. (set_endian): Always update the architecture. Set target_byte_order_user after success. (target_architecture_auto): Removed. (target_architecture_user): New. (selected_architecture_name, show_architecture): Check it. (set_architecture): Set target_architecture_user after success. (gdbarch_from_bfd): Check the argument. (default_byte_order): New. (initialize_current_architecture): Set the global default architecture and endianness. (gdbarch_info_fill): Remove GDBARCH argument. Do not check the previous architecture. Use exec_bfd, global selected architecture and endianness, and global defaults. * arch-utils.h (selected_byte_order): Remove prototype. (gdbarch_info_fill): Update. * exec.c (exec_file_attach): Update the architecture after removing the current file. * gdbarch.sh: Update comments. (find_arch_by_info): Remove OLD_GDBARCH argument. Update call to gdbarch_info_fill. (gdbarch_find_by_info): Update call to find_arch_by_info. * gdbarch.h, gdbarch.c: Regenerated. * remote-sim.c (gdbsim_open): Use TARGET_BYTE_ORDER. gdb/doc/ * gdbint.texinfo (Target Architecture Definition): Add new Initializing a New Architecture section.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index cad6e04..784816f 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -3987,7 +3987,7 @@ gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
that there is no current architecture. */
static struct gdbarch *
-find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
+find_arch_by_info (struct gdbarch_info info)
{
struct gdbarch *new_gdbarch;
struct gdbarch_registration *rego;
@@ -3997,9 +3997,9 @@ find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
gdb_assert (current_gdbarch == NULL);
/* Fill in missing parts of the INFO struct using a number of
- sources: "set ..."; INFOabfd supplied; and the existing
- architecture. */
- gdbarch_info_fill (old_gdbarch, &info);
+ sources: "set ..."; INFOabfd supplied; and the global
+ defaults. */
+ gdbarch_info_fill (&info);
/* Must have found some sort of architecture. */
gdb_assert (info.bfd_arch_info != NULL);
@@ -4130,7 +4130,7 @@ gdbarch_find_by_info (struct gdbarch_info info)
struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
/* Find the specified architecture. */
- struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
+ struct gdbarch *new_gdbarch = find_arch_by_info (info);
/* Restore the existing architecture. */
gdb_assert (current_gdbarch == NULL);