summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/common/NativeThreadProtocol.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-03-29 10:09:11 +0000
committerPavel Labath <labath@google.com>2018-03-29 10:09:11 +0000
commit47381fa611595c69a8496ae964a456963efe905c (patch)
treebee536502cf20a555e0f6780c9d1bc0483f6c8c4 /lldb/source/Host/common/NativeThreadProtocol.cpp
parenta8b717fda42294d1c8e1f05d71280503e5839f14 (diff)
downloadbcm5719-llvm-47381fa611595c69a8496ae964a456963efe905c.tar.gz
bcm5719-llvm-47381fa611595c69a8496ae964a456963efe905c.zip
NativeThreadProtocol: delete dead code
These functions were unused as everyone just went straight for the direct operations on the register context. In fact, the Save/RestoreAllRegisters actually appear to be wrong (inverted). Thanks to Tatyana for pointing this out. These functions are not very useful now that we can guarantee that each thread always contains a valid register context, so I just delete them. llvm-svn: 328770
Diffstat (limited to 'lldb/source/Host/common/NativeThreadProtocol.cpp')
-rw-r--r--lldb/source/Host/common/NativeThreadProtocol.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/lldb/source/Host/common/NativeThreadProtocol.cpp b/lldb/source/Host/common/NativeThreadProtocol.cpp
index 3f3915e006d..0c648e40eb5 100644
--- a/lldb/source/Host/common/NativeThreadProtocol.cpp
+++ b/lldb/source/Host/common/NativeThreadProtocol.cpp
@@ -19,36 +19,3 @@ using namespace lldb_private;
NativeThreadProtocol::NativeThreadProtocol(NativeProcessProtocol &process,
lldb::tid_t tid)
: m_process(process), m_tid(tid) {}
-
-Status NativeThreadProtocol::ReadRegister(uint32_t reg,
- RegisterValue &reg_value) {
- NativeRegisterContext &register_context = GetRegisterContext();
-
- const RegisterInfo *const reg_info =
- register_context.GetRegisterInfoAtIndex(reg);
- if (!reg_info)
- return Status("no register info for reg num %" PRIu32, reg);
-
- return register_context.ReadRegister(reg_info, reg_value);
- ;
-}
-
-Status NativeThreadProtocol::WriteRegister(uint32_t reg,
- const RegisterValue &reg_value) {
- NativeRegisterContext& register_context = GetRegisterContext();
-
- const RegisterInfo *const reg_info =
- register_context.GetRegisterInfoAtIndex(reg);
- if (!reg_info)
- return Status("no register info for reg num %" PRIu32, reg);
-
- return register_context.WriteRegister(reg_info, reg_value);
-}
-
-Status NativeThreadProtocol::SaveAllRegisters(lldb::DataBufferSP &data_sp) {
- return GetRegisterContext().WriteAllRegisterValues(data_sp);
-}
-
-Status NativeThreadProtocol::RestoreAllRegisters(lldb::DataBufferSP &data_sp) {
- return GetRegisterContext().ReadAllRegisterValues(data_sp);
-}
OpenPOWER on IntegriCloud