From 65d6d66a1d8bf3f39f2624c64736103aff32df20 Mon Sep 17 00:00:00 2001 From: Peter Schauer Date: Tue, 19 Feb 2002 18:42:27 +0000 Subject: [PATCH] * i386-tdep.c (i386_gdbarch_init): Eliminate incorrect use of ``current_gdbarch''. --- gdb/ChangeLog | 5 +++++ gdb/i386-tdep.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6aad9b44373..a82dc9b1606 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-02-19 Peter Schauer + + * i386-tdep.c (i386_gdbarch_init): Eliminate incorrect use + of ``current_gdbarch''. + 2002-02-19 Richard Earnshaw * armnbsd-nat.c : ANSIfy all function declarations. diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 946838bccce..b2ddd280675 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. */ -- 2.30.2