* i386-tdep.c (i386_gdbarch_init): Eliminate incorrect use
authorPeter Schauer <Peter.Schauer@mytum.de>
Tue, 19 Feb 2002 18:42:27 +0000 (18:42 +0000)
committerPeter Schauer <Peter.Schauer@mytum.de>
Tue, 19 Feb 2002 18:42:27 +0000 (18:42 +0000)
        of ``current_gdbarch''.

gdb/ChangeLog
gdb/i386-tdep.c

index 6aad9b443730e5fcea5dbe62d739423d8f9acded..a82dc9b1606d57ec33f34c1675523a0b9eecc800 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-19  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
+
+       * i386-tdep.c (i386_gdbarch_init): Eliminate incorrect use
+        of ``current_gdbarch''.
+
 2002-02-19  Richard Earnshaw  <rearnsha@arm.com>
 
        * armnbsd-nat.c : ANSIfy all function declarations.
index 946838bccce1ee57b43e577e18c50116b4d6a240..b2ddd280675c38e8af94c5b2ee6654cb87995c60 100644 (file)
@@ -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.  */