aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-04-02 20:23:36 +0000
committerDaniel Jacobowitz <drow@false.org>2006-04-02 20:23:36 +0000
commitd000b273284f3fd1f3b36abdc564d6b47b3bb6f3 (patch)
tree3198886f0c5e9d57a767d9df7784ad9667dd94a5
parentfb20ccaae3ab3e6964b95e8e077d11b31c8f8d8c (diff)
downloadgdb-d000b273284f3fd1f3b36abdc564d6b47b3bb6f3.zip
gdb-d000b273284f3fd1f3b36abdc564d6b47b3bb6f3.tar.gz
gdb-d000b273284f3fd1f3b36abdc564d6b47b3bb6f3.tar.bz2
Remove old features when switching architectures.
-rw-r--r--gdb/infcmd.c6
1 files 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);
}