[Lldb-commits] [lldb] [lldb] Add ReadCStrings API to Process (PR #172026)
Felipe de Azevedo Piovezan via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 16 02:21:28 PST 2025
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
More information about the lldb-commits
mailing list