This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Use the string returned by pretty printer for MI varobjs instead of "{...}"
- From: Tom Tromey <tromey at redhat dot com>
- To: xgsa <xgsa at yandex dot ua>
- Cc: "gdb-patches\ at sourceware dot org" <gdb-patches at sourceware dot org>, Vladimir_Prus at mentor dot com
- Date: Tue, 15 May 2012 10:28:25 -0600
- Subject: Re: [patch] Use the string returned by pretty printer for MI varobjs instead of "{...}"
- References: <305151335125397@web28e.yandex.ru>
>>>>> "Anton" == xgsa <xgsa@yandex.ua> writes:
Anton> The documentation for -var-create says that "for a varobj whose type
Anton> is some sort of aggregate (e.g., a struct), or for a dynamic varobj,
Anton> the 'value' attribute will not be interesting". That's not true, as
Anton> dynamic varobj could also have no children (so its value will be not
Anton> "{...}" and will be interesting). However I think the string value of
Anton> varobj that has pretty printer installed should always be returned via
Anton> MI. It could contain such a useful information as container length or
Anton> reference count for smart pointers. Moreover, it seems that this
Anton> information cannot be accessed via MI in another way. This patch
Anton> contains the proposed fix, documentation and test suite update.
The patch itself looks fine, but I am not sure whether it should go in.
My recollection is that the code originally worked this way, but
Vladimir asked for the "{...}" behavior specifically.
I've CC'd him for comments.
I am in favor of this change, as I never understood the current
behavior; so in the absence of comments I will approve it.
I'm sorry about the delay.
Tom