From: Daniel Jacobowitz Date: Sun, 2 Apr 2006 20:23:36 +0000 (+0000) Subject: Remove old features when switching architectures. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d000b273284f3fd1f3b36abdc564d6b47b3bb6f3;p=thirdparty%2Fbinutils-gdb.git Remove old features when switching architectures. --- diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 09732ff4a46..66387d9f5e6 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -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); }