This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

varobjs "in_scope"


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]