diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2008-04-13 09:33:49 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2008-04-13 09:33:49 +0000 |
commit | fcacd99f87bf1f39ba0b3fde4a71b2876c20bd70 (patch) | |
tree | 75fab46541391f348714e21c53206075958367ae /gdb/varobj.c | |
parent | 350fc95b2b48a859478efc3ba0ba99c56e7971aa (diff) | |
download | gdb-fcacd99f87bf1f39ba0b3fde4a71b2876c20bd70.zip gdb-fcacd99f87bf1f39ba0b3fde4a71b2876c20bd70.tar.gz gdb-fcacd99f87bf1f39ba0b3fde4a71b2876c20bd70.tar.bz2 |
Fix @-varobjs.
* varobj.c (value_of_root): Update the expression for
floating varobjs.
* mi/mi-cmd-var.c (varobj_update_one): If type has changed,
report that.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r-- | gdb/varobj.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index 7f7fda2..b27013c 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -1751,6 +1751,16 @@ value_of_root (struct varobj **var_handle, int *type_changed) new_type = varobj_get_type (tmp_var); if (strcmp (old_type, new_type) == 0) { + /* The expression presently stored inside var->root->exp + remembers the locations of local variables relatively to + the frame where the expression was created (in DWARF location + button, for example). Naturally, those locations are not + correct in other frames, so update the expression. */ + + struct expression *tmp_exp = var->root->exp; + var->root->exp = tmp_var->root->exp; + tmp_var->root->exp = tmp_exp; + varobj_delete (tmp_var, NULL, 0); *type_changed = 0; } |