jasonmolenda 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 target, 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.

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