jasonmolenda wrote:

> Maybe we could use SBStructuredData? Though I don't see a way for a client to 
> discover the length of a contained string value. `GetStringValue` takes a 
> length but you'd have to keep guessing larger and larger numbers? I have not 
> used this type before though so I could be missing something.


That would allow for an array of ["str1", "str2", null, "", "str3"], with null 
indicating a read failure.

SBStructuredData::GetStringValue returns a `size_t` which is the complete size 
of the string, so it can be called with nullptr or length 0 to find the 
complete string size, then re-call to fetch.  Or we could add a 
GetValueString() API that takes an SBStream like other 

https://github.com/llvm/llvm-project/pull/172026
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to