This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Use the string returned by pretty printer for MI varobjs instead of "{...}"


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]