[Lldb-commits] [lldb] [lldb] Add ReadCStrings API to Process (PR #172026)
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 16 01:58:22 PST 2025
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
More information about the lldb-commits
mailing list