diff options
author | Nick Roberts <nickrob@snap.net.nz> | 2006-12-08 22:06:04 +0000 |
---|---|---|
committer | Nick Roberts <nickrob@snap.net.nz> | 2006-12-08 22:06:04 +0000 |
commit | 0d2bd018fdae9f49842892b4ea31532b466dda75 (patch) | |
tree | 23a15d3af3ada3723414fd301b44202a4820e7e4 /gdb | |
parent | 3dca6e60388a251679c0decd368f755a3bc72a54 (diff) | |
download | gdb-0d2bd018fdae9f49842892b4ea31532b466dda75.zip gdb-0d2bd018fdae9f49842892b4ea31532b466dda75.tar.gz gdb-0d2bd018fdae9f49842892b4ea31532b466dda75.tar.bz2 |
(varobj_update): Ensure frame is restored when
variable object is out of scope.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/varobj.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index ae247c5..39760ad 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -1052,6 +1052,12 @@ varobj_update (struct varobj **varp, struct varobj ***changelist) has changed. */ type_changed = 1; new = value_of_root (varp, &type_changed); + + /* Restore selected frame */ + fi = frame_find_by_id (old_fid); + if (fi) + select_frame (fi); + if (new == NULL) { (*varp)->error = 1; @@ -1147,11 +1153,6 @@ varobj_update (struct varobj **varp, struct varobj ***changelist) *(*changelist + changed) = NULL; } - /* Restore selected frame */ - fi = frame_find_by_id (old_fid); - if (fi) - select_frame (fi); - if (type_changed) return -2; else |