This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 1/2] framework for varobj type mutation
- From: Tom Tromey <tromey at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 01 Mar 2012 13:34:30 -0700
- Subject: Re: [RFA 1/2] framework for varobj type mutation
- References: <1330555268-32692-1-git-send-email-brobecker@adacore.com> <1330555268-32692-2-git-send-email-brobecker@adacore.com>
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> As explained in our previous discussions on the subject, the idea is
Joel> that the language would detect whether the type of a varobj has mutated
Joel> or not, and if it has, then the core module would simply report that
Joel> the varobj's type_changed attribute is "true", and implicitly delete
Joel> all the varobj's children.
Ok, I think I finally understand what you meant :)
Your approach makes sense to me.
Joel> + v->to = -1; /* FIXME: Is that necessary? */
Joel> + v->from = -1;
This seems mildly iffy, since it changes the var update range "behind
the user's back". I understand why you'd do it, though.
This should at least be documented.
FWIW, setting ->to = -1 is fine, it can't hurt.
I would zap the FIXME comments.
Tom