diff options
author | Daniel Jacobowitz <dan@debian.org> | 2006-04-02 20:23:36 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2006-04-02 20:23:36 +0000 |
commit | 89b61d0019bedaa29fb7e7608e64a31052caf7f0 (patch) | |
tree | 1d4bbd428bf44889eae3cecb1ef62123eaadb261 | |
parent | 1984a159542a732023494000e0b8dce3dae0cc73 (diff) | |
download | gdb-89b61d0019bedaa29fb7e7608e64a31052caf7f0.tar.gz |
Remove old features when switching architectures.
-rw-r--r-- | gdb/infcmd.c | 6 |
1 files changed, 4 insertions, 2 deletions
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); } |