diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-05-19 23:08:41 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-05-19 23:08:41 +0000 |
| commit | c25433f3d218c502f0c24d346b51fb6ce0d3cc16 (patch) | |
| tree | e959a48439b7d943398b14a710d88734bf5476ee /lldb/source/Plugins/Process/Linux/RegisterContextLinux_i386.cpp | |
| parent | c18a538646e9233e47c74df7c9f6d32547039593 (diff) | |
| download | bcm5719-llvm-c25433f3d218c502f0c24d346b51fb6ce0d3cc16.tar.gz bcm5719-llvm-c25433f3d218c502f0c24d346b51fb6ce0d3cc16.zip | |
A bit of clean up.
Removed ifdeffed out functions and added the implementation of
WriteRegister for x86_64 architecture.
Signed-off-by: Johnny Chen <johnny.chen@apple.com>
llvm-svn: 131696
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/RegisterContextLinux_i386.cpp')
| -rw-r--r-- | lldb/source/Plugins/Process/Linux/RegisterContextLinux_i386.cpp | 59 |
1 files changed, 3 insertions, 56 deletions
diff --git a/lldb/source/Plugins/Process/Linux/RegisterContextLinux_i386.cpp b/lldb/source/Plugins/Process/Linux/RegisterContextLinux_i386.cpp index 0a8ec5a1c0d..cc669d53a16 100644 --- a/lldb/source/Plugins/Process/Linux/RegisterContextLinux_i386.cpp +++ b/lldb/source/Plugins/Process/Linux/RegisterContextLinux_i386.cpp @@ -419,71 +419,18 @@ RegisterContextLinux_i386::ReadRegister(const RegisterInfo *reg_info, return monitor.ReadRegisterValue(GetRegOffset(reg), value); } -#if 0 - -bool -RegisterContextLinux_i386::ReadRegisterValue(uint32_t reg, - Scalar &value) -{ - ProcessMonitor &monitor = GetMonitor(); - return monitor.ReadRegisterValue(GetRegOffset(reg), value); -} - -bool -RegisterContextLinux_i386::ReadRegisterBytes(uint32_t reg, - DataExtractor &data) -{ - uint8_t *buf = reinterpret_cast<uint8_t*>(&user); - bool status; - - if (IsGPR(reg)) - status = ReadGPR(); - else if (IsFPR(reg)) - status = ReadFPR(); - else - { - assert(false && "invalid register number"); - status = false; - } - - if (status) - data.SetData(buf + GetRegOffset(reg), GetRegSize(reg), lldb::endian::InlHostByteOrder()); - - return status; -} - -#endif - bool RegisterContextLinux_i386::ReadAllRegisterValues(DataBufferSP &data_sp) { return false; } -#if 0 - -bool -RegisterContextLinux_i386::WriteRegisterValue(uint32_t reg, - const Scalar &value) -{ - ProcessMonitor &monitor = GetMonitor(); - return monitor.WriteRegisterValue(GetRegOffset(reg), value); -} - -bool -RegisterContextLinux_i386::WriteRegisterBytes(uint32_t reg, - DataExtractor &data, - uint32_t data_offset) -{ - return false; -} - -#endif - bool RegisterContextLinux_i386::WriteRegister(const RegisterInfo *reg_info, const RegisterValue &value) { - return false; + const uint32_t reg = reg_info->kinds[eRegisterKindLLDB]; + ProcessMonitor &monitor = GetMonitor(); + return monitor.WriteRegisterValue(GetRegOffset(reg), value); } bool |

