llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-lldb Author: Felipe de Azevedo Piovezan (felipepiovezan) <details> <summary>Changes</summary> These allow for more efficient saving/restoring state after an expression is evaluated. --- Full diff: https://github.com/llvm/llvm-project/pull/132079.diff 2 Files Affected: - (modified) lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp (+16) - (modified) lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.h (+4) ``````````diff diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp index abddae5d9ced4..75438550ce914 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp @@ -114,6 +114,14 @@ bool RegisterContextThreadMemory::ReadAllRegisterValues( return false; } +bool RegisterContextThreadMemory::ReadAllRegisterValues( + lldb_private::RegisterCheckpoint ®_checkpoint) { + UpdateRegisterContext(); + if (m_reg_ctx_sp) + return m_reg_ctx_sp->ReadAllRegisterValues(reg_checkpoint); + return false; +} + bool RegisterContextThreadMemory::WriteAllRegisterValues( const lldb::DataBufferSP &data_sp) { UpdateRegisterContext(); @@ -122,6 +130,14 @@ bool RegisterContextThreadMemory::WriteAllRegisterValues( return false; } +bool RegisterContextThreadMemory::WriteAllRegisterValues( + const lldb_private::RegisterCheckpoint ®_checkpoint) { + UpdateRegisterContext(); + if (m_reg_ctx_sp) + return m_reg_ctx_sp->WriteAllRegisterValues(reg_checkpoint); + return false; +} + bool RegisterContextThreadMemory::CopyFromRegisterContext( lldb::RegisterContextSP reg_ctx_sp) { UpdateRegisterContext(); diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.h b/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.h index 0a7314528f0ae..23f675508cf38 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.h +++ b/lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.h @@ -52,8 +52,12 @@ class RegisterContextThreadMemory : public lldb_private::RegisterContext { // so these API's should only be used when this behavior is needed. bool ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override; + bool ReadAllRegisterValues( + lldb_private::RegisterCheckpoint ®_checkpoint) override; bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override; + bool WriteAllRegisterValues( + const lldb_private::RegisterCheckpoint ®_checkpoint) override; bool CopyFromRegisterContext(lldb::RegisterContextSP context); `````````` </details> https://github.com/llvm/llvm-project/pull/132079 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits