[Lldb-commits] [lldb] [lldb] Make ValueObjectDynamicValue::UpdateValue() point to a host b… (PR #125143)

Augusto Noronha via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 3 15:48:19 PST 2025


augusto2112 wrote:

> What are the ownership rules for that reference to bytes that you are passing out? Who's keeping it alive and for how long?

Since `ValueObjectDynamicValue::UpdateValue` immediately copies the buffer over I don't think that's a big concern...

I could change `ArrayRef` to an actual buffer that owns the data, but I think that would be a bit wasteful since `UpdateValue` always copies it anyway.

Or are you asking me to clarify in the documentation that callers have to copy out the data if they want to own it?

https://github.com/llvm/llvm-project/pull/125143


More information about the lldb-commits mailing list