jimingham wrote:
This is a mostly orthogonal comment, but at some point, we really should switch
all the summaries that pretend to be the value of a variable to value providing
Synthetic Children.
Summaries are currently playing two fairly different roles, one some free-form
text that describes the value but has no semantic meaning and the other to
represent some structure that acts as a scalar "value" when used, so it's
supposed to stand in for the value. That makes life hard for clients, since
you have no good way to know whether you should use GetValueAsCString or
GetSummary in the value field for a variable.
Using a synthetic child provider as first conceived was awkward for this,
because the a synthetic child was always ValueObject child of the top level
value, which means you have to disclose an opaque toplevel to see what is
supposed to be the value of the data type.
When we started doing swift, this came up a lot so we added "value providing
synthetic child providers" where you can reply 0 to num_children, and you be
asked get_value instead, and the SBValue that returns will act much like the
dynamic type does, and replace the original ValueObject with the one you
returned. That makes a good presentation for this "formal scalar value".
Then summary strings could go back to always being "side notes" on the
variable's value, which should make client's lives easier...
C-strings are still tricky, since to users they really always have two values,
the memory address, and the contents of that memory address up to the next
null...
Jim
> On Oct 23, 2023, at 3:05 PM, Greg Clayton ***@***.***> wrote:
>
>
> Another thing other IDEs do is show something like "{...}" as the value for a
> struct/union/class. This is what Visual Studio used to do.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/llvm/llvm-project/pull/69815#issuecomment-1776094800>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ADUPVWZDUQ6DSJA6JBHOCOLYA3SY3AVCNFSM6AAAAAA6J5ZRRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZWGA4TIOBQGA>.
> You are receiving this because you are on a team that was mentioned.
>
https://github.com/llvm/llvm-project/pull/69815
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits