This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: -var-info-path-expression
> > and propagate these changes back to struct language_specific so we have:
> >
> > static char *
> > name_of_child (struct varobj *var, int index)
> > {
> > return (char *) (*var->root->lang->describe_child) (CHILD_NAME, var, index);
>
> And have casts from void* to the right type? I'm not sure that's any
> advantage.
Maybe using making a cast is as sinful as using a goto statement, I wouldn't
know, but I would call having four times fewer functions an advantage.
Perhaps it would be better to use a macro e.g
#define name_of_child(var, index) \
(char *) (*var->root->lang->describe_child) (CHILD_NAME, var, index)
--
Nick http://www.inet.net.nz/~nickrob