aboutsummaryrefslogtreecommitdiff
path: root/gdb/cris-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-05-01 03:14:05 +0000
committerAndrew Cagney <cagney@redhat.com>2002-05-01 03:14:05 +0000
commitaf566d9f8ce9121ba79c13c0b38eb5b2b98e0341 (patch)
treea74b40fcc9e8ad3da10a68265c1f6a4fa3ed8681 /gdb/cris-tdep.c
parentcc7e59b2801a8c8ff83123284bede19e6e0af226 (diff)
downloadgdb-af566d9f8ce9121ba79c13c0b38eb5b2b98e0341.zip
gdb-af566d9f8ce9121ba79c13c0b38eb5b2b98e0341.tar.gz
gdb-af566d9f8ce9121ba79c13c0b38eb5b2b98e0341.tar.bz2
* cris-tdep.c (cris_gdbarch_init): Use arches instead of
current_gdbarch.
Diffstat (limited to 'gdb/cris-tdep.c')
-rw-r--r--gdb/cris-tdep.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 9a52611..e85ac12 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -4100,17 +4100,19 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
cris_abi = CRIS_ABI_V2;
}
}
- else if (gdbarch_tdep (current_gdbarch))
+ else if (arches != NULL)
{
- /* No bfd available. Stick with whatever ABI we're currently using.
- (This is to avoid changing the ABI when the user updates the
- architecture with the 'set cris-version' command.) */
- cris_abi = gdbarch_tdep (current_gdbarch)->cris_abi;
+ /* No bfd available. Stick with the ABI from the most recently
+ selected architecture of this same family (the head of arches
+ always points to this). (This is to avoid changing the ABI
+ when the user updates the architecture with the 'set
+ cris-version' command.) */
+ cris_abi = gdbarch_tdep (arches->gdbarch)->cris_abi;
}
else
{
- /* No bfd, and no current architecture available. Assume it's the
- new ABI. */
+ /* No bfd, and no previously selected architecture available.
+ Assume it's the new ABI. */
cris_abi = CRIS_ABI_V2;
}