diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:26:05 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:26:05 +0000 |
| commit | 14f1b3e8826ce43b978db93a62d1166055db5394 (patch) | |
| tree | 0a00ad8d3498783fe0193f3b656bca17c4c8697d /source/Plugins/Process/Linux/NativeRegisterContextLinux.h | |
| parent | 4ee8c119c71a06dcad1e0fecc8c675e480e59337 (diff) | |
Notes
Diffstat (limited to 'source/Plugins/Process/Linux/NativeRegisterContextLinux.h')
| -rw-r--r-- | source/Plugins/Process/Linux/NativeRegisterContextLinux.h | 103 |
1 files changed, 44 insertions, 59 deletions
diff --git a/source/Plugins/Process/Linux/NativeRegisterContextLinux.h b/source/Plugins/Process/Linux/NativeRegisterContextLinux.h index 0b0b747984b4..a16c65b64a07 100644 --- a/source/Plugins/Process/Linux/NativeRegisterContextLinux.h +++ b/source/Plugins/Process/Linux/NativeRegisterContextLinux.h @@ -18,87 +18,72 @@ namespace lldb_private { namespace process_linux { -class NativeRegisterContextLinux : public NativeRegisterContextRegisterInfo -{ +class NativeRegisterContextLinux : public NativeRegisterContextRegisterInfo { public: - NativeRegisterContextLinux(NativeThreadProtocol &native_thread, - uint32_t concrete_frame_idx, - RegisterInfoInterface *reg_info_interface_p); + NativeRegisterContextLinux(NativeThreadProtocol &native_thread, + uint32_t concrete_frame_idx, + RegisterInfoInterface *reg_info_interface_p); - // This function is implemented in the NativeRegisterContextLinux_* subclasses to create a new - // instance of the host specific NativeRegisterContextLinux. The implementations can't collide - // as only one NativeRegisterContextLinux_* variant should be compiled into the final - // executable. - static NativeRegisterContextLinux* - CreateHostNativeRegisterContextLinux(const ArchSpec& target_arch, - NativeThreadProtocol &native_thread, - uint32_t concrete_frame_idx); + // This function is implemented in the NativeRegisterContextLinux_* subclasses + // to create a new + // instance of the host specific NativeRegisterContextLinux. The + // implementations can't collide + // as only one NativeRegisterContextLinux_* variant should be compiled into + // the final + // executable. + static NativeRegisterContextLinux * + CreateHostNativeRegisterContextLinux(const ArchSpec &target_arch, + NativeThreadProtocol &native_thread, + uint32_t concrete_frame_idx); protected: - lldb::ByteOrder - GetByteOrder() const; + lldb::ByteOrder GetByteOrder() const; - virtual Error - ReadRegisterRaw(uint32_t reg_index, RegisterValue& reg_value); + virtual Error ReadRegisterRaw(uint32_t reg_index, RegisterValue ®_value); - virtual Error - WriteRegisterRaw(uint32_t reg_index, const RegisterValue& reg_value); + virtual Error WriteRegisterRaw(uint32_t reg_index, + const RegisterValue ®_value); - virtual Error - ReadRegisterSet(void *buf, size_t buf_size, unsigned int regset); + virtual Error ReadRegisterSet(void *buf, size_t buf_size, + unsigned int regset); - virtual Error - WriteRegisterSet(void *buf, size_t buf_size, unsigned int regset); + virtual Error WriteRegisterSet(void *buf, size_t buf_size, + unsigned int regset); - virtual Error - ReadGPR(); + virtual Error ReadGPR(); - virtual Error - WriteGPR(); + virtual Error WriteGPR(); - virtual Error - ReadFPR(); + virtual Error ReadFPR(); - virtual Error - WriteFPR(); + virtual Error WriteFPR(); - virtual void* - GetGPRBuffer() { return nullptr; } + virtual void *GetGPRBuffer() { return nullptr; } - virtual size_t - GetGPRSize() { return GetRegisterInfoInterface().GetGPRSize(); } + virtual size_t GetGPRSize() { + return GetRegisterInfoInterface().GetGPRSize(); + } - virtual void* - GetFPRBuffer() { return nullptr; } + virtual void *GetFPRBuffer() { return nullptr; } - virtual size_t - GetFPRSize() { return 0; } + virtual size_t GetFPRSize() { return 0; } + // The Do*** functions are executed on the privileged thread and can perform + // ptrace + // operations directly. + virtual Error DoReadRegisterValue(uint32_t offset, const char *reg_name, + uint32_t size, RegisterValue &value); - // The Do*** functions are executed on the privileged thread and can perform ptrace - // operations directly. - virtual Error - DoReadRegisterValue(uint32_t offset, - const char* reg_name, - uint32_t size, - RegisterValue &value); + virtual Error DoWriteRegisterValue(uint32_t offset, const char *reg_name, + const RegisterValue &value); - virtual Error - DoWriteRegisterValue(uint32_t offset, - const char* reg_name, - const RegisterValue &value); + virtual Error DoReadGPR(void *buf, size_t buf_size); - virtual Error - DoReadGPR(void *buf, size_t buf_size); + virtual Error DoWriteGPR(void *buf, size_t buf_size); - virtual Error - DoWriteGPR(void *buf, size_t buf_size); + virtual Error DoReadFPR(void *buf, size_t buf_size); - virtual Error - DoReadFPR(void *buf, size_t buf_size); - - virtual Error - DoWriteFPR(void *buf, size_t buf_size); + virtual Error DoWriteFPR(void *buf, size_t buf_size); }; } // namespace process_linux |
