https://github.com/DavidSpickett commented:
What's the thinking for doing this in "ptrace style" where the caller allocates a buffer and gives it to the function, vs. allocating the buffer on behalf of the caller? The latter would make it impossible to get the buffer size wrong, but on the other hand, the caller would know best how to allocate a given size buffer (stack, heap, and so on). If the main use case (and the only one right now) is a small number of bytes from a large set of addresses, we're probably talking stack sized allocations not heap. So allowing the caller to set that up would be logical. I also thought what about a MultiMemWrite, would it make sense to have a symmetric API for that hypothetical packet. If the caller allocates the buffer, the two would be symmetric. And you could do a "gather read" from N places and "scatter write" to N other places. (no real use case for this, just theory crafting) It's an internal API so we can always swap later but please include your thinking in the PR description even if it's an arbitrary choice, might be interesting in future. https://github.com/llvm/llvm-project/pull/163651 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
