This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
MI: Another -var-update bug?
- From: Nick Roberts <nickrob at snap dot net dot nz>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 13 Dec 2006 00:04:44 +1300
- Subject: MI: Another -var-update bug?
Variable objects appear to test scope on a frame basis (in c_value_of root).
If we create a variable object for j in the inner block of the program below
then doing -var-update on line 10 doesn't report it as being out of scope. But
struct varobj_root has a member struct block *valid_block. Presumably the
addresses in this structure can be used to test if the variable is still in
scope or not
--
Nick http://www.inet.net.nz/~nickrob
1 main ()
2 {
3 int i;
4 i = 1;
5 {
6 int j;
7 j = 2;
8 printf ("j = %d\n", j);
9 }
10 i = 3;
11 }