This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] varobj deletion after the binary has changed
- From: Denis PILAT <denis dot pilat at st dot com>
- To: gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 01 Feb 2007 10:49:00 +0100
- Subject: Re: [RFC] varobj deletion after the binary has changed
- References: <45B60056.6030704@st.com> <20070123124457.GA1600@nevyn.them.org> <45B63A49.4010609@st.com> <45B8E8A8.9040904@st.com> <17849.12231.246980.478169@kahikatea.snap.net.nz> <20070125232731.GA30178@nevyn.them.org> <45BDEAEC.1050006@st.com> <17854.28971.170898.231523@kahikatea.snap.net.nz> <45C0B042.9040308@st.com> <17857.2617.164646.935952@kahikatea.snap.net.nz>
Nick Roberts wrote:
> /* sanity check: have we been passed a pointer? */
> if (changelist == NULL)
> - return -1;
> + return WRONG_PARAM;
>
> /* Only root variables can be updated... */
> if (!is_root_p (*varp))
> /* Not a root var */
> - return -1;
> + return WRONG_PARAM;
> +
> + if (!(*varp)->root->is_valid)
> + return INVALID;
OK I hadn't noticed the distinction between WRONG_PARAM and INVALID. I think
it would be better to throw an error in the case of WRONG_PARAM, otherwise
changes to leaf values may go unnoticed. But this is a separate change.
Yes it is, and the bigger is this patch the less it has chance to be
approved.
I've not checked the test but I think the English could be improved and
different names used:
Oh really?? I though my froggy English was the best.
Anyway thanks for your comments, I'll take them into account once you've
tested the test and once Daniel gives me a feedback about the C part of
the patch.
--
Denis