From: Vladimir Prus <ghost@cs.msu.su>
To: gdb-patches@sources.redhat.com
Subject: Fix 'selected frame' varobjs
Date: Sun, 31 Dec 2006 00:02:00 -0000 [thread overview]
Message-ID: <200612310301.42649.ghost@cs.msu.su> (raw)
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]
At the moment, the 'selected frame' varobjs (created with -var-create NAME @) are
somewhat broken.
I've reported that in:
http://article.gmane.org/gmane.comp.gdb.devel/16381
to which Dan posted a preliminary patch to which I replied with another bug:
http://article.gmane.org/gmane.comp.gdb.devel/16398
and the story ended there. This patch fixed both problems and causes no
regressions. OK?
- Volodya
2006-12-31 Daniel Jacobowitz <dan@codesourcery.com>
Vladimir Prus <vladimir@codesourcery.com>
Fix 'selected frame' varobjs.
* varobj.c (varobj_update): If we get error getting new
value of root, reset the value.
(c_value_of_root): Always reevaluate the value
of selected frame varobjs in the selected frame.
Dont call reinit_frame_cache.
[-- Attachment #2: at_varobjs__gdb_mainline.diff --]
[-- Type: text/x-diff, Size: 936 bytes --]
--- gdb/varobj.c (/mirrors/gdb_mainline) (revision 3011)
+++ gdb/varobj.c (/patches/gdb/at_varobjs/gdb_mainline) (revision 3011)
@@ -1061,6 +1061,14 @@ varobj_update (struct varobj **varp, str
if (new == NULL)
{
(*varp)->error = 1;
+ /* Also set the value to NULL, so that
+ when the value becomes valid in future,
+ -var-update notice the change. */
+ if ((*varp)->value != NULL)
+ {
+ value_free ((*varp)->value);
+ (*varp)->value = NULL;
+ }
return -1;
}
@@ -1950,11 +1958,10 @@ c_value_of_root (struct varobj **var_han
/* Determine whether the variable is still around. */
- if (var->root->valid_block == NULL)
+ if (var->root->valid_block == NULL || var->root->use_selected_frame)
within_scope = 1;
else
{
- reinit_frame_cache ();
fi = frame_find_by_id (var->root->frame);
within_scope = fi != NULL;
/* FIXME: select_frame could fail */
next reply other threads:[~2006-12-31 0:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-31 0:02 Vladimir Prus [this message]
2006-12-31 21:42 ` Daniel Jacobowitz
2007-01-09 21:22 ` Vladimir Prus
2007-01-09 21:45 ` Daniel Jacobowitz
2007-01-16 2:14 ` Vladimir Prus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200612310301.42649.ghost@cs.msu.su \
--to=ghost@cs.msu.su \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox