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 "{...}"
So could I check this patch in or not? I have written my arguments for
these changes, Vladimir has written his ones against them. It seems Tom
in favor of these changes too. So what is the final decision? Could
somebody say "these changes are approved" or "no, these changes should
not go in" or what should be done in such cases?
Thanks,
Anton
-------- Original message --------
I has been quite a while, but I think I was primarily concerned that
GDB would abuse value string on varobj
to show what GDB thinks is the right rendering of data. E.g. while
"[5]" as top-level value might be a reasonable
rendition for an array with 5 children, it's not entirely clear why
GDB's machine interface should take liberties
at telling frontend how to render that. Neither "[", nor 5, nor "]"
is integral part of data, and as soon as
GDB outputs that, frontend has no way of knowing whether this is GDB
trying to be helpful, or really interesting
data that cannot be obtained in any other way.
I cannot figure out why the frontend need to know it? I think, it
should just output what GDB returns, cause GDB knows better how to
visualize the concrete data type due to pretty printers mechanism.
Otherwise, the frontend should have something similar to pretty
printers that will visualize different types in a comfortable way. In
any case if the implemented behavior is not desirable the string()
method of pretty printer could be left unimplemented (or return None).
It will give the behavior you described above, but could also be
extended if necessary.
Thanks,
Anton