[Lldb-commits] [lldb] Summarize std::string's when created from data. (PR #89110)
via lldb-commits
lldb-commits at lists.llvm.org
Thu May 23 15:08:16 PDT 2024
jimingham wrote:
We should definitely put more comments in the ValueObject.h header, a lot of those interfaces are mysterious.
GetAddressOf is solving a very particular problem, which is that if someone does:
(lldb) expr MakeMeAFooObject()
$0= {whatever}
(lldb) expr CallAFunctionTakingAFooPointer(&$0)
People really want that to work, but $0 is a "constant result" so where it lives is not clear. It's also important for data formatters that want to use a pointer to some ValueObject or ValueObject child. For expr results we make a shadow copy in the target so we can resolve this issue (this is one of the jobs of the `m_live_address` ivar).
So it is really for finding addresses in the target, and should fail if we can't realize that.
https://github.com/llvm/llvm-project/pull/89110
More information about the lldb-commits
mailing list