summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2015-06-26 10:14:12 +0000
committerPavel Labath <labath@google.com>2015-06-26 10:14:12 +0000
commitc7512fdc1e35109122853aa2d0d51e267bb71ee6 (patch)
tree582375e739db3a128c0e0fbedd9a1c7f27ac36ab /lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h
parent63a74ad8586c8164e825342397b364d87bc4b750 (diff)
downloadbcm5719-llvm-c7512fdc1e35109122853aa2d0d51e267bb71ee6.tar.gz
bcm5719-llvm-c7512fdc1e35109122853aa2d0d51e267bb71ee6.zip
[NativeProcessLinux] Use lambdas in DoOperation calls
Summary: This removes a lot of boilerplate, which was needed to execute monitor operations. Previously one needed do declare a separate class for each operation which would manually capture all needed arguments, which was very verbose. In addition to less code, I believe this also makes the code more readable, since now the implementation of the operation can be physically closer to the code that invokes it. Test Plan: Code compiles on x86, arm and mips, tests pass on x86 linux. Reviewers: tberghammer, chaoren Subscribers: aemerson, lldb-commits Differential Revision: http://reviews.llvm.org/D10694 llvm-svn: 240772
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h34
1 files changed, 16 insertions, 18 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h
index 0b5b29a024e..9a2e89f5bf2 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h
@@ -87,24 +87,22 @@ namespace process_linux {
NumSupportedHardwareWatchpoints () override;
protected:
- NativeProcessLinux::OperationUP
- GetReadRegisterValueOperation(uint32_t offset,
- const char* reg_name,
- uint32_t size,
- RegisterValue &value) override;
-
- NativeProcessLinux::OperationUP
- GetWriteRegisterValueOperation(uint32_t offset,
- const char* reg_name,
- const RegisterValue &value) override;
-
- NativeProcessLinux::OperationUP
- GetReadWatchPointRegisterValueOperation(lldb::tid_t tid,
- void* watch_readback);
-
- NativeProcessLinux::OperationUP
- GetWriteWatchPointRegisterValueOperation(lldb::tid_t tid,
- void* watch_readback);
+ Error
+ DoReadRegisterValue(uint32_t offset,
+ const char* reg_name,
+ uint32_t size,
+ RegisterValue &value) override;
+
+ Error
+ DoWriteRegisterValue(uint32_t offset,
+ const char* reg_name,
+ const RegisterValue &value) override;
+
+ Error
+ DoReadWatchPointRegisterValue(lldb::tid_t tid, void* watch_readback);
+
+ Error
+ DoWriteWatchPointRegisterValue(lldb::tid_t tid, void* watch_readback);
bool
IsFR0();
OpenPOWER on IntegriCloud