[LLDB][MIPS] Addressing some errors and warnings due to rL239991

llvm-svn: 240016
This commit is contained in:
Mohit K. Bhakkad 2015-06-18 13:35:29 +00:00
parent 23c6283ae3
commit de8b81b45a
2 changed files with 17 additions and 11 deletions

View File

@ -330,8 +330,8 @@ namespace
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/// @class ReadWatchPointRegOperation /// @class ReadWatchPointRegOperation
/// @brief Implements NativeProcessLinux::ReadWatchPointRegisterValue. /// @brief Implements NativeRegisterContextLinux_mips64::ReadWatchPointRegisterValue.
class ReadWatchPointRegOperation : public Operation class ReadWatchPointRegOperation : public NativeProcessLinux::Operation
{ {
public: public:
ReadWatchPointRegOperation ( ReadWatchPointRegOperation (
@ -351,8 +351,8 @@ namespace
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/// @class SetWatchPointRegOperation /// @class SetWatchPointRegOperation
/// @brief Implements NativeProcessLinux::SetWatchPointRegisterValue. /// @brief Implements NativeRegisterContextLinux_mips64::SetWatchPointRegisterValue.
class SetWatchPointRegOperation : public Operation class SetWatchPointRegOperation : public NativeProcessLinux::Operation
{ {
public: public:
SetWatchPointRegOperation ( SetWatchPointRegOperation (
@ -769,6 +769,7 @@ GetWatchHi (struct pt_watch_regs *regs, uint32_t index)
return regs->mips64.watchhi[index]; return regs->mips64.watchhi[index];
else else
log->Printf("Invalid watch register style"); log->Printf("Invalid watch register style");
return 0;
} }
static void static void
@ -781,6 +782,7 @@ SetWatchHi (struct pt_watch_regs *regs, uint32_t index, uint16_t value)
regs->mips64.watchhi[index] = value; regs->mips64.watchhi[index] = value;
else else
log->Printf("Invalid watch register style"); log->Printf("Invalid watch register style");
return;
} }
static lldb::addr_t static lldb::addr_t
@ -793,6 +795,7 @@ GetWatchLo (struct pt_watch_regs *regs, uint32_t index)
return regs->mips64.watchlo[index]; return regs->mips64.watchlo[index];
else else
log->Printf("Invalid watch register style"); log->Printf("Invalid watch register style");
return LLDB_INVALID_ADDRESS;
} }
static void static void
@ -805,6 +808,7 @@ SetWatchLo (struct pt_watch_regs *regs, uint32_t index, uint64_t value)
regs->mips64.watchlo[index] = value; regs->mips64.watchlo[index] = value;
else else
log->Printf("Invalid watch register style"); log->Printf("Invalid watch register style");
return;
} }
static uint32_t static uint32_t
@ -817,6 +821,7 @@ GetIRWMask (struct pt_watch_regs *regs, uint32_t index)
return regs->mips64.watch_masks[index] & IRW; return regs->mips64.watch_masks[index] & IRW;
else else
log->Printf("Invalid watch register style"); log->Printf("Invalid watch register style");
return 0;
} }
static uint32_t static uint32_t
@ -829,6 +834,7 @@ GetRegMask (struct pt_watch_regs *regs, uint32_t index)
return regs->mips64.watch_masks[index] & ~IRW; return regs->mips64.watch_masks[index] & ~IRW;
else else
log->Printf("Invalid watch register style"); log->Printf("Invalid watch register style");
return 0;
} }
static lldb::addr_t static lldb::addr_t
@ -1117,15 +1123,15 @@ NativeRegisterContextLinux_mips64::GetWriteRegisterValueOperation(uint32_t offse
} }
NativeProcessLinux::OperationUP NativeProcessLinux::OperationUP
NativeRegisterContextLinux_mips64::GetReadWatchPointRegisterValue(lldb::tid_t tid, void* watch_readback) NativeRegisterContextLinux_mips64::GetReadWatchPointRegisterValueOperation(lldb::tid_t tid, void* watch_readback)
{ {
return NativeProcessLinux::OperationUP(new ReadWatchPointRegOperation(m_thread.GetID(), watch_readback)); return NativeProcessLinux::OperationUP(new ReadWatchPointRegOperation(m_thread.GetID(), watch_readback));
} }
NativeProcessLinux::OperationUP NativeProcessLinux::OperationUP
NativeRegisterContextLinux_mips64::GetWriteWatchPointRegisterValue(lldb::tid_t tid, void* watch_reg_value) NativeRegisterContextLinux_mips64::GetWriteWatchPointRegisterValueOperation(lldb::tid_t tid, void* watch_reg_value)
{ {
return NativeProcessLinux::OperationUP(new SetWatchPointRegOperation(m_thread.GetID(), watch_readback)); return NativeProcessLinux::OperationUP(new SetWatchPointRegOperation(m_thread.GetID(), watch_reg_value));
} }
#endif // defined (__mips__) #endif // defined (__mips__)

View File

@ -96,12 +96,12 @@ namespace process_linux {
const RegisterValue &value) override; const RegisterValue &value) override;
NativeProcessLinux::OperationUP NativeProcessLinux::OperationUP
GetReadWatchPointRegisterValue(lldb::tid_t tid, GetReadWatchPointRegisterValueOperation(lldb::tid_t tid,
void* watch_readback); void* watch_readback);
NativeProcessLinux::OperationUP NativeProcessLinux::OperationUP
GetWriteWatchPointRegisterValue(lldb::tid_t tid, GetWriteWatchPointRegisterValueOperation(lldb::tid_t tid,
void* watch_readback); void* watch_readback);
bool bool
IsFR0(); IsFR0();