]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove old features when switching architectures.
authorDaniel Jacobowitz <drow@false.org>
Sun, 2 Apr 2006 20:23:36 +0000 (20:23 +0000)
committerDaniel Jacobowitz <drow@false.org>
Sun, 2 Apr 2006 20:23:36 +0000 (20:23 +0000)
gdb/infcmd.c

index 09732ff4a46e8f39d9ecb2f0c8c4fda3cd461b9a..66387d9f5e687164a2be47cdaab4e53177d3606a 100644 (file)
@@ -421,8 +421,10 @@ post_create_inferior (struct target_ops *target, int from_tty)
       obstack_init (&tmp_obstack);
       features = target_available_features (target, &tmp_obstack);
 
-      if (features)
-       arch_set_available_features (features);
+      /* Switch to a new architecture.  We must call this even if
+        the target could not return features; if the previous
+        target could, we may have the wrong architecture selected.  */
+      arch_set_available_features (features);
 
       obstack_free (&tmp_obstack, NULL);
     }