This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Variable objects: references formatting
> > There are som many things about this patch that I don't understand:
>
> I may have made a mistake in reviewing, but please don't be
> elliptical: just say what you think is wrong.
If I had understood what was wrong I would have said so. As I didn't I
could only point out inconsistencies.
> The patch is against an older version of varobj.c, and does seem to be
> cut from a larger patch, but it applies, and given the surrounding
> code in c_value_of_variable, and the behavior of c_val_print, the
> general sense of the change seems correct. Have you tried creating
> varobjs for values that are references to structs and displaying them,
> which I think is the case actually being addressed?
OK, if its a patch for -var-valuate-expression then perhaps the BOGUS
comment could be removed as it seems to address this issue.
I see a more serious error with references: they don't seem to disappear
from the changelist with -var-update:
-var-create - * q
^done,name="var1",numchild="1",type="tommy"
(gdb)
-var-create - * rq
^done,name="var2",numchild="1",type="tommy &"
(gdb)
-var-update *
^done,changelist=[{name="var2",in_scope="true",type_changed="false"}]
(gdb)
-var-update *
^done,changelist=[{name="var2",in_scope="true",type_changed="false"}]
(gdb)
-var-update *
^done,changelist=[{name="var2",in_scope="true",type_changed="false"}]
--
Nick http://www.inet.net.nz/~nickrob