================ @@ -1085,6 +1085,19 @@ std::string VariableDescription::GetResult(llvm::StringRef context) { return description.trim().str(); } +lldb::addr_t GetMemoryReference(lldb::SBValue v) { + if (!v.GetType().IsPointerType() && !v.GetType().IsArrayType()) { + return LLDB_INVALID_ADDRESS; + } + + lldb::SBValue deref = v.Dereference(); + if (!deref.IsValid()) { + return LLDB_INVALID_ADDRESS; + } + + return deref.GetLoadAddress(); ---------------- vogelsgesang wrote:
Continued in https://github.com/llvm/llvm-project/pull/104317#discussion_r1719180273 https://github.com/llvm/llvm-project/pull/104317 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits