This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Patch: implement new dynamic varobj spec
> Nick> In fact it would also make things easier if the "exp" field of
> Nick> -var-list-children was just a number and this would make it
> Nick> consistent with ordinary arrays.
>
> The children might not actually represent an array. For example, they
> may conceptually be fields of a struct.
>
> Nick> + /* Strip square brackets from string. */
> Nick> + len = strlen (py_name);
> Nick> + name = strndup (py_name + 1, len - 2);
>
> There is nothing guaranteeing square brackets about the name. The name
> is determined wholly by the Python pretty-printer, which can return
> anything at all.
OK. As it came out of PyArg_ParseTuple, I had presumed it was part of Python
syntax.
> I would prefer not to change this. I think front ends simply have to
> treat the child name as an arbitrary string. They can use the display
> hint to decide how and if to display the name.
For collections, it would seem useful to have some kind of index number.
--
Nick http://www.inet.net.nz/~nickrob