Also, add summaries for SmallVector and ArrayRef,
and fix the StringRef summary provider so it doesn't ignore the Length field.
Thanks for doing this! I have not used PointerIntPair or PointerUnion, but I will take a look at those types. I take it these expression evaluations are necessary?
when the string length is greater than max_length, it would be nice for the returned string to indicate truncation. I just checked a long std::string and the output was:
"really long string"...
Also the max length for std::string is 1024, should StringRef use 1024 too?
should this print an error message?
what's the best way to handle quotes inside the string? A quick search shows this could use json (a hack):
json.dumps('hello world') # '"hello world"' json.dumps('hello "quoted" world') # '"hello \\"quoted\\" world"'
Well, I think they are. There is too much template magic behind figuring out how many bits in the pointer we use to store an additional integer value.
Expression evaluations are not only slow, but they also prevent us from formatting nested PointerIntPairs, since the expression path is modified and doesn't correspond to the actual implementation anymore, therefore evaluating expressions down the tree will not work.
But I guess we can live with that for now.
LLDB supports the max-string-summary-length setting, but unfortunately there is no way to get the value of that setting through Python API.
@broadwaylamb hi, have you been using the PointerUnion formatter? We have seen a variety of issues, which don't seem to have easy fixes. If you're not using it, I will disable it. Alternatively, I propose creating a separate file that you and others could choose to import separately from lldbDataFormatters.py.