AndrÃ> It would be perfect if the pretty-printers-can-return-pretty-printers
AndrÃ> approach would also allow to (easily) feed the pretty printers with
AndrÃ> per-value individual data. I found this pretty useful for "patchwork"
AndrÃ> applications, that cannot easily use global settings for everything.
AndrÃ> [In some cases you would like to do things like "display char * as
AndrÃ> Latin1, but in some cases it's UTF-8, sometimes it's a \0-separated and
AndrÃ> \0\0-terminated 'list' of strings, and sometimes really only a pointer
AndrÃ> to a single char". Or you have some numerical data in an array that you'd
AndrÃ> like to run through xplot as "pretty printer", but you don't want to
AndrÃ> invoke that on every value of type std::vector<double>. Things like that.]
varobj lets you assign a printer to a specific varobj, but I'm not sure
if anything uses this, and it probably only makes sense if there is
prior coordination with the front end.
Handling this via sub-pretty-printers for (e.g.) specific fields in
known structures seems reasonable. But I don't know a fully general way
to handle this, like if the user wants "print some_global_string" to
automatically know to use a different encoding.