varobjs "in_scope"
Vladimir Prus
vladimir@codesourcery.com
Sun Mar 25 11:31:00 GMT 2007
Hi,
it looks like we're a little bit inconsistent in how
we deal with varobjs whose value cannot be evaluated.
In some cases, MI returns "" as a value of varobjs
that cannot be evaluated. In some cases MI
returns in_scope="false".
For example, if you create a varobj
for "*p", and the program changes p to NULL,
and you issue -var-update, you get:
-var-update V
^done,changelist=[{name="V",in_scope="true",type_changed="false"}]
(gdb)
-var-evaluate-expression V
^done,value=""
If you create a varobj for **p, and the program changes p
to NULL, and you issue -var-update, you get:
-var-update V
^done,changelist=[{name="V",in_scope="false"}]
(gdb)
This difference in behaviour does not seem reasonable.
I suggest that we either:
1. Completely kill the "in_scope" attribute. To represent current
in_scope="invalid", introduce some other attribute, like "valid".
2. Keep in_scope for the cases where either the frame varobj
is bound too no longer exists, or the expression corresponding
to varobj cannot be reparsed. Use value="" for the cases
where expression can be reparsed, but the value cannot be
evaluated.
Comments?
- Volodya
More information about the Gdb
mailing list