This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Patch: implement new dynamic varobj spec
- From: Tom Tromey <tromey at redhat dot com>
- To: nickrob at snap dot net dot nz (Nick Roberts)
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 14 Sep 2009 14:12:11 -0600
- Subject: Re: Patch: implement new dynamic varobj spec
- References: <19116.23500.574462.227048@totara.tehura.co.nz>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Nick" == Nick Roberts <nickrob@snap.net.nz> writes:
Nick> 2) -var-update seems to list changes to children of dynamic
Nick> objects in reverse numerical order.
Tom> Oh, odd. But not a bug, really, as the order is not specified.
Nick> It might not be a bug but it's desirable to list them in order as
Nick> that makes it easier to insert them into the existing list.
Ok, I will look into this.
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.
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.
Tom