aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-tdep.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>2002-02-19 18:42:27 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>2002-02-19 18:42:27 +0000
commit65d6d66a1d8bf3f39f2624c64736103aff32df20 (patch)
treed0fad1a59d30250203aa8b0867f1fdf9e72ea2a0 /gdb/i386-tdep.c
parentbe5523fb1fae4992e620666ac9e858604782ccf2 (diff)
downloadgdb-65d6d66a1d8bf3f39f2624c64736103aff32df20.zip
gdb-65d6d66a1d8bf3f39f2624c64736103aff32df20.tar.gz
gdb-65d6d66a1d8bf3f39f2624c64736103aff32df20.tar.bz2
* i386-tdep.c (i386_gdbarch_init): Eliminate incorrect use
of ``current_gdbarch''.
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r--gdb/i386-tdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 946838b..b2ddd28 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -1305,9 +1305,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
arches != NULL;
arches = gdbarch_list_lookup_by_info (arches->next, &info))
{
- if (gdbarch_tdep (current_gdbarch)->os_ident != os_ident)
- continue;
- return arches->gdbarch;
+ tdep = gdbarch_tdep (arches->gdbarch);
+ if (tdep && tdep->os_ident == os_ident)
+ return arches->gdbarch;
}
/* Allocate space for the new architecture. */