[Lldb-commits] [lldb] c2f6460 - [lldb] Update the NativeRegisterContext to take a WritableMemoryBuffer
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Apr 5 14:19:07 PDT 2022
Author: Jonas Devlieghere
Date: 2022-04-05T14:19:01-07:00
New Revision: c2f6460145175d265cd1a7ad7906b778bb11fa3d
URL: https://github.com/llvm/llvm-project/commit/c2f6460145175d265cd1a7ad7906b778bb11fa3d
DIFF: https://github.com/llvm/llvm-project/commit/c2f6460145175d265cd1a7ad7906b778bb11fa3d.diff
LOG: [lldb] Update the NativeRegisterContext to take a WritableMemoryBuffer
Added:
Modified:
lldb/include/lldb/Host/common/NativeRegisterContext.h
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.cpp
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.h
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.cpp
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.cpp
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86_64.cpp
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86_64.h
lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp
lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h
lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.cpp
lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.h
lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.cpp
lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h
lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h
lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp
lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Host/common/NativeRegisterContext.h b/lldb/include/lldb/Host/common/NativeRegisterContext.h
index f7568fe31b80d..0a7647d780803 100644
--- a/lldb/include/lldb/Host/common/NativeRegisterContext.h
+++ b/lldb/include/lldb/Host/common/NativeRegisterContext.h
@@ -51,7 +51,7 @@ class NativeRegisterContext
virtual Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) = 0;
- virtual Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) = 0;
+ virtual Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) = 0;
virtual Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) = 0;
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.cpp
index c4ee3773eaeb0..117d7084f7051 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.cpp
@@ -140,7 +140,7 @@ Status NativeRegisterContextFreeBSD_arm::WriteRegister(
}
Status NativeRegisterContextFreeBSD_arm::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
Status error;
error = ReadRegisterSet(RegisterInfoPOSIX_arm::GPRegSet);
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h
index 4be75b958fc16..89ffa617294aa 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h
@@ -44,7 +44,7 @@ class NativeRegisterContextFreeBSD_arm : public NativeRegisterContextFreeBSD {
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp
index 143d94069bc61..638ec16dd884f 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp
@@ -149,7 +149,7 @@ Status NativeRegisterContextFreeBSD_arm64::WriteRegister(
}
Status NativeRegisterContextFreeBSD_arm64::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
Status error;
error = ReadRegisterSet(RegisterInfoPOSIX_arm64::GPRegSet);
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.h
index a230f8fed48aa..799209e26e868 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.h
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.h
@@ -51,7 +51,7 @@ class NativeRegisterContextFreeBSD_arm64
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.cpp
index d93b7fd338154..4b9e34082e2cf 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.cpp
@@ -176,7 +176,7 @@ Status NativeRegisterContextFreeBSD_mips64::WriteRegister(
}
Status NativeRegisterContextFreeBSD_mips64::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
Status error;
error = ReadRegisterSet(GPRegSet);
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h
index 8e300ed829c9d..7a2c0b34eeee2 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h
@@ -44,7 +44,7 @@ class NativeRegisterContextFreeBSD_mips64
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.cpp
index 5b5d44a308b14..54a2582b0f083 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.cpp
@@ -227,7 +227,7 @@ Status NativeRegisterContextFreeBSD_powerpc::WriteRegister(
}
Status NativeRegisterContextFreeBSD_powerpc::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
Status error;
error = ReadRegisterSet(GPRegSet);
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h
index 884c25988ce11..c773943665179 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h
@@ -44,7 +44,7 @@ class NativeRegisterContextFreeBSD_powerpc
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86_64.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86_64.cpp
index 9328d606ad26d..09d31db321067 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86_64.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86_64.cpp
@@ -537,7 +537,7 @@ Status NativeRegisterContextFreeBSD_x86_64::WriteRegister(
}
Status NativeRegisterContextFreeBSD_x86_64::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
Status error;
data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86_64.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86_64.h
index efd0f91f77b92..366a89b6eec8f 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86_64.h
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86_64.h
@@ -48,7 +48,7 @@ class NativeRegisterContextFreeBSD_x86_64
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index 3d8715050ae0a..dd91af54f4541 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -1240,7 +1240,7 @@ NativeProcessLinux::Syscall(llvm::ArrayRef<uint64_t> args) {
NativeRegisterContextLinux::SyscallData syscall_data =
*reg_ctx.GetSyscallData();
- DataBufferSP registers_sp;
+ WritableDataBufferSP registers_sp;
if (llvm::Error Err = reg_ctx.ReadAllRegisterValues(registers_sp).ToError())
return std::move(Err);
auto restore_regs = llvm::make_scope_exit(
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
index 399cd699a040f..7db0d9eec6d24 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
@@ -192,7 +192,7 @@ NativeRegisterContextLinux_arm::WriteRegister(const RegisterInfo *reg_info,
}
Status NativeRegisterContextLinux_arm::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
Status error;
data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
index 4ce3797e7bdea..15b46609c286b 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
@@ -37,7 +37,7 @@ class NativeRegisterContextLinux_arm : public NativeRegisterContextLinux {
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
index f28bddcb9a99b..dccd8049c03dc 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
@@ -449,7 +449,7 @@ Status NativeRegisterContextLinux_arm64::WriteRegister(
}
Status NativeRegisterContextLinux_arm64::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
// AArch64 register data must contain GPRs, either FPR or SVE registers
// and optional MTE register. Pointer Authentication (PAC) registers are
// read-only and will be skiped.
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
index 2f8a4a601181e..14f669a3ce98f 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
@@ -43,7 +43,7 @@ class NativeRegisterContextLinux_arm64
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp
index 1c447175033e9..adf76bbb026bd 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp
@@ -349,7 +349,7 @@ Status NativeRegisterContextLinux_ppc64le::WriteRegister(
}
Status NativeRegisterContextLinux_ppc64le::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
Status error;
data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h
index 2f2a92ebf1fb3..fac395807796c 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h
@@ -43,7 +43,7 @@ class NativeRegisterContextLinux_ppc64le : public NativeRegisterContextLinux {
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
index 3c0916499f70d..0c3afd66ee256 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
@@ -328,7 +328,7 @@ Status NativeRegisterContextLinux_s390x::WriteRegister(
}
Status NativeRegisterContextLinux_s390x::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
Status error;
data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
index 5ed78810a18bd..4b97fc89c3482 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
@@ -38,7 +38,7 @@ class NativeRegisterContextLinux_s390x : public NativeRegisterContextLinux {
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
index bd4b168f4964e..f6562fc290e46 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
@@ -689,7 +689,7 @@ Status NativeRegisterContextLinux_x86_64::WriteRegister(
}
Status NativeRegisterContextLinux_x86_64::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
Status error;
data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
index 8287e4967d34c..7c29b636ad5d9 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
@@ -41,7 +41,7 @@ class NativeRegisterContextLinux_x86_64
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
index 3d164eadbea70..597fa7c354f37 100644
--- a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
+++ b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
@@ -527,7 +527,7 @@ Status NativeRegisterContextNetBSD_x86_64::WriteRegister(
}
Status NativeRegisterContextNetBSD_x86_64::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
Status error;
data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
diff --git a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
index 31005952dd75a..795cbeefd4674 100644
--- a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
+++ b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
@@ -46,7 +46,7 @@ class NativeRegisterContextNetBSD_x86_64
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp
index 5c356979ca16b..b8659d758fd6e 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp
@@ -367,7 +367,7 @@ Status NativeRegisterContextWindows_WoW64::WriteRegister(
}
Status NativeRegisterContextWindows_WoW64::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
const size_t data_size = REG_CONTEXT_SIZE;
data_sp = std::make_shared<DataBufferHeap>(data_size, 0);
::WOW64_CONTEXT tls_context;
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h
index b1bf725e9639a..213826ac7feda 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h
@@ -34,7 +34,7 @@ class NativeRegisterContextWindows_WoW64 : public NativeRegisterContextWindows {
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.cpp
index 2cc16e9233310..91070c9173b96 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.cpp
@@ -560,7 +560,7 @@ Status NativeRegisterContextWindows_arm::WriteRegister(
}
Status NativeRegisterContextWindows_arm::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
const size_t data_size = REG_CONTEXT_SIZE;
data_sp = std::make_shared<DataBufferHeap>(data_size, 0);
::CONTEXT tls_context;
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.h b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.h
index 2778bed9a78de..d8e8e81dde13d 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.h
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.h
@@ -33,7 +33,7 @@ class NativeRegisterContextWindows_arm : public NativeRegisterContextWindows {
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.cpp
index 479063d3066f2..72554512e36e6 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.cpp
@@ -670,7 +670,7 @@ Status NativeRegisterContextWindows_arm64::WriteRegister(
}
Status NativeRegisterContextWindows_arm64::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
const size_t data_size = REG_CONTEXT_SIZE;
data_sp = std::make_shared<DataBufferHeap>(data_size, 0);
::CONTEXT tls_context;
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h
index fbf4d1f163f79..88afc1e7b18a2 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h
@@ -33,7 +33,7 @@ class NativeRegisterContextWindows_arm64 : public NativeRegisterContextWindows {
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
index da8db9afb3be9..fc6c6c3647205 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
@@ -376,7 +376,7 @@ Status NativeRegisterContextWindows_i386::WriteRegister(
}
Status NativeRegisterContextWindows_i386::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
const size_t data_size = REG_CONTEXT_SIZE;
data_sp = std::make_shared<DataBufferHeap>(data_size, 0);
::CONTEXT tls_context;
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h
index d357e63423814..325fbc35d3482 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h
@@ -34,7 +34,7 @@ class NativeRegisterContextWindows_i386 : public NativeRegisterContextWindows {
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp
index a189dbb3d4866..f34699ed23f07 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp
@@ -579,7 +579,7 @@ Status NativeRegisterContextWindows_x86_64::WriteRegister(
}
Status NativeRegisterContextWindows_x86_64::ReadAllRegisterValues(
- lldb::DataBufferSP &data_sp) {
+ lldb::WritableDataBufferSP &data_sp) {
const size_t data_size = REG_CONTEXT_SIZE;
data_sp = std::make_shared<DataBufferHeap>(data_size, 0);
::CONTEXT tls_context;
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h
index 8699f740c8f68..1eea8fbaa2e1c 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h
@@ -35,7 +35,7 @@ class NativeRegisterContextWindows_x86_64
Status WriteRegister(const RegisterInfo *reg_info,
const RegisterValue ®_value) override;
- Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+ Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index b421d4189ebc9..0a44929ce2b7b 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -3053,7 +3053,7 @@ GDBRemoteCommunicationServerLLGS::Handle_QSaveRegisterState(
NativeRegisterContext& reg_context = thread->GetRegisterContext();
// Save registers to a buffer.
- DataBufferSP register_data_sp;
+ WritableDataBufferSP register_data_sp;
Status error = reg_context.ReadAllRegisterValues(register_data_sp);
if (error.Fail()) {
LLDB_LOG(log, "pid {0} failed to save all register values: {1}",
More information about the lldb-commits
mailing list