From d000b273284f3fd1f3b36abdc564d6b47b3bb6f3 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Sun, 2 Apr 2006 20:23:36 +0000 Subject: Remove old features when switching architectures. --- gdb/infcmd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 09732ff..66387d9 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); } -- cgit v1.1