This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] i386-tdep.c: i386_gdbarch_init() fix


Approved per private conversation with Mark Kettenis.

2002-02-19  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>

	* i386-tdep.c (i386_gdbarch_init): Eliminate incorrect use
        of ``current_gdbarch''.

--- ./i386-tdep.c.orig	Tue Jan  1 17:29:43 2002
+++ ./i386-tdep.c	Mon Feb 18 17:20:54 2002
@@ -1295,9 +1295,9 @@ i386_gdbarch_init (struct gdbarch_info i
        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.  */

-- 
Peter Schauer			pes@regent.e-technik.tu-muenchen.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]