felipepiovezan wrote:

> This patch has wandered into two unfortunate areas of SB API -- the 
> trickiness of indicating failures of memory reads, and the lack of elegance 
> for returning variable length string values. I don't know if I think this PR 
> needs to handle them, it's one more log on the pile of places you can miss a 
> memory read, Felipe up to you, IMO.
> 
> As for string inelegance, I almost wish we could have a contract where 
> something like an SBValue could return a char* into a little const string 
> pool associated with the object, and the lifetime of that char* was 
> explicitly tied to the life of that SBValue object. But we hand out char*'s 
> in many API already today for things that are forever-valid, like strings in 
> a Module's symbol table or whatever.

I think there is something to be said about how easy it is to use the 
StringList API, which I believe is also a similar point as David was making. 
@medismailben were you not convinced by those points?

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