forked from OSchip/llvm-project
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
This commit is contained in:
parent
c18a538646
commit
c25433f3d2
|
@ -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
|
||||
|
|
|
@ -475,64 +475,30 @@ RegisterContextLinux_x86_64::GetRegisterSet(uint32_t set)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#if 0
|
||||
bool
|
||||
RegisterContextLinux_x86_64::ReadRegisterValue(uint32_t reg,
|
||||
Scalar &value)
|
||||
RegisterContextLinux_x86_64::ReadRegister(const RegisterInfo *reg_info,
|
||||
RegisterValue &value)
|
||||
{
|
||||
const uint32_t reg = reg_info->kinds[eRegisterKindLLDB];
|
||||
ProcessMonitor &monitor = GetMonitor();
|
||||
return monitor.ReadRegisterValue(GetRegOffset(reg), value);
|
||||
}
|
||||
|
||||
bool
|
||||
RegisterContextLinux_x86_64::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_x86_64::ReadAllRegisterValues(DataBufferSP &data_sp)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#if 0
|
||||
bool
|
||||
RegisterContextLinux_x86_64::WriteRegisterValue(uint32_t reg,
|
||||
const Scalar &value)
|
||||
RegisterContextLinux_x86_64::WriteRegister(const lldb_private::RegisterInfo *reg_info,
|
||||
const lldb_private::RegisterValue &value)
|
||||
{
|
||||
const uint32_t reg = reg_info->kinds[eRegisterKindLLDB];
|
||||
ProcessMonitor &monitor = GetMonitor();
|
||||
return monitor.WriteRegisterValue(GetRegOffset(reg), value);
|
||||
}
|
||||
|
||||
bool
|
||||
RegisterContextLinux_x86_64::WriteRegisterBytes(uint32_t reg,
|
||||
DataExtractor &data,
|
||||
uint32_t data_offset)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool
|
||||
RegisterContextLinux_x86_64::WriteAllRegisterValues(const DataBufferSP &data)
|
||||
{
|
||||
|
|
|
@ -41,14 +41,6 @@ public:
|
|||
const lldb_private::RegisterSet *
|
||||
GetRegisterSet(uint32_t set);
|
||||
|
||||
#if 0
|
||||
bool
|
||||
ReadRegisterValue(uint32_t reg, lldb_private::Scalar &value);
|
||||
|
||||
bool
|
||||
ReadRegisterBytes(uint32_t reg, lldb_private::DataExtractor &data);
|
||||
#endif
|
||||
|
||||
virtual bool
|
||||
ReadRegister(const lldb_private::RegisterInfo *reg_info,
|
||||
lldb_private::RegisterValue &value);
|
||||
|
@ -56,15 +48,6 @@ public:
|
|||
bool
|
||||
ReadAllRegisterValues(lldb::DataBufferSP &data_sp);
|
||||
|
||||
#if 0
|
||||
bool
|
||||
WriteRegisterValue(uint32_t reg, const lldb_private::Scalar &value);
|
||||
|
||||
bool
|
||||
WriteRegisterBytes(uint32_t reg, lldb_private::DataExtractor &data,
|
||||
uint32_t data_offset = 0);
|
||||
#endif
|
||||
|
||||
virtual bool
|
||||
WriteRegister(const lldb_private::RegisterInfo *reg_info,
|
||||
const lldb_private::RegisterValue &value);
|
||||
|
|
Loading…
Reference in New Issue