[Lldb-commits] [lldb] 09b0e56 - [lldb] Add RegisterCheckpoint overload for register methods in RegisterContextThreadMemory (#132079)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 19 16:07:31 PDT 2025
Author: Felipe de Azevedo Piovezan
Date: 2025-03-19T20:07:28-03:00
New Revision: 09b0e5624c7673cffd84a497c4b6ac7a41c59269
URL: https://github.com/llvm/llvm-project/commit/09b0e5624c7673cffd84a497c4b6ac7a41c59269
DIFF: https://github.com/llvm/llvm-project/commit/09b0e5624c7673cffd84a497c4b6ac7a41c59269.diff
LOG: [lldb] Add RegisterCheckpoint overload for register methods in RegisterContextThreadMemory (#132079)
Added:
Modified:
lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.cpp
lldb/source/Plugins/Process/Utility/RegisterContextThreadMemory.h
Removed:
################################################################################
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);
More information about the lldb-commits
mailing list