<rdar://problem/12602978>

RegisterContextKDP_i386 was not correctly writing registers due to missing "virtual" keywords. Added the virtual keywords and made the functions pure virtual to ensure subclasses can't get away without implementing these functions.

llvm-svn: 167066
This commit is contained in:
Greg Clayton 2012-10-30 23:57:32 +00:00
parent 2fb45d0aff
commit c280746b8c
4 changed files with 44 additions and 89 deletions

View File

@ -259,7 +259,7 @@ class RegisterContextDarwin_arm_Mach : public RegisterContextDarwin_arm
{
public:
RegisterContextDarwin_arm_Mach (lldb_private::Thread &thread, const DataExtractor &data) :
RegisterContextDarwin_arm (thread, 0)
RegisterContextDarwin_arm (thread, 0)
{
SetRegisterDataFrom_LC_THREAD (data);
}
@ -316,6 +316,12 @@ protected:
{
return 0;
}
virtual int
DoReadDBG (lldb::tid_t tid, int flavor, DBG &dbg)
{
return -1;
}
virtual int
DoWriteGPR (lldb::tid_t tid, int flavor, const GPR &gpr)
@ -334,6 +340,12 @@ protected:
{
return 0;
}
virtual int
DoWriteDBG (lldb::tid_t tid, int flavor, const DBG &dbg)
{
return -1;
}
};
#define MACHO_NLIST_ARM_SYMBOL_IS_THUMB 0x0008

View File

@ -284,47 +284,26 @@ protected:
return -1;
}
int
DoReadFPU (lldb::tid_t tid, int flavor, FPU &fpu)
{
return -1;
}
virtual int
DoReadFPU (lldb::tid_t tid, int flavor, FPU &fpu) = 0;
int
DoReadEXC (lldb::tid_t tid, int flavor, EXC &exc)
{
return -1;
}
virtual int
DoReadEXC (lldb::tid_t tid, int flavor, EXC &exc) = 0;
int
DoReadDBG (lldb::tid_t tid, int flavor, DBG &dbg)
{
return -1;
}
virtual int
DoReadDBG (lldb::tid_t tid, int flavor, DBG &dbg) = 0;
int
DoWriteGPR (lldb::tid_t tid, int flavor, const GPR &gpr)
{
return -1;
}
virtual int
DoWriteGPR (lldb::tid_t tid, int flavor, const GPR &gpr) = 0;
int
DoWriteFPU (lldb::tid_t tid, int flavor, const FPU &fpu)
{
return -1;
}
virtual int
DoWriteFPU (lldb::tid_t tid, int flavor, const FPU &fpu) = 0;
int
DoWriteEXC (lldb::tid_t tid, int flavor, const EXC &exc)
{
return -1;
}
virtual int
DoWriteEXC (lldb::tid_t tid, int flavor, const EXC &exc) = 0;
int
DoWriteDBG (lldb::tid_t tid, int flavor, const DBG &dbg)
{
return -1;
}
virtual int
DoWriteDBG (lldb::tid_t tid, int flavor, const DBG &dbg) = 0;
int
ReadRegisterSet (uint32_t set, bool force);

View File

@ -230,40 +230,22 @@ protected:
// Subclasses override these to do the actual reading.
virtual int
DoReadGPR (lldb::tid_t tid, int flavor, GPR &gpr)
{
return -1;
}
DoReadGPR (lldb::tid_t tid, int flavor, GPR &gpr) = 0;
int
DoReadFPU (lldb::tid_t tid, int flavor, FPU &fpu)
{
return -1;
}
virtual int
DoReadFPU (lldb::tid_t tid, int flavor, FPU &fpu) = 0;
int
DoReadEXC (lldb::tid_t tid, int flavor, EXC &exc)
{
return -1;
}
virtual int
DoReadEXC (lldb::tid_t tid, int flavor, EXC &exc) = 0;
int
DoWriteGPR (lldb::tid_t tid, int flavor, const GPR &gpr)
{
return -1;
}
virtual int
DoWriteGPR (lldb::tid_t tid, int flavor, const GPR &gpr) = 0;
int
DoWriteFPU (lldb::tid_t tid, int flavor, const FPU &fpu)
{
return -1;
}
virtual int
DoWriteFPU (lldb::tid_t tid, int flavor, const FPU &fpu) = 0;
int
DoWriteEXC (lldb::tid_t tid, int flavor, const EXC &exc)
{
return -1;
}
virtual int
DoWriteEXC (lldb::tid_t tid, int flavor, const EXC &exc) = 0;
int
ReadRegisterSet (uint32_t set, bool force);

View File

@ -234,40 +234,22 @@ protected:
// Subclasses override these to do the actual reading.
virtual int
DoReadGPR (lldb::tid_t tid, int flavor, GPR &gpr)
{
return -1;
}
DoReadGPR (lldb::tid_t tid, int flavor, GPR &gpr) = 0;
virtual int
DoReadFPU (lldb::tid_t tid, int flavor, FPU &fpu)
{
return -1;
}
DoReadFPU (lldb::tid_t tid, int flavor, FPU &fpu) = 0;
virtual int
DoReadEXC (lldb::tid_t tid, int flavor, EXC &exc)
{
return -1;
}
DoReadEXC (lldb::tid_t tid, int flavor, EXC &exc) = 0;
virtual int
DoWriteGPR (lldb::tid_t tid, int flavor, const GPR &gpr)
{
return -1;
}
DoWriteGPR (lldb::tid_t tid, int flavor, const GPR &gpr) = 0;
virtual int
DoWriteFPU (lldb::tid_t tid, int flavor, const FPU &fpu)
{
return -1;
}
DoWriteFPU (lldb::tid_t tid, int flavor, const FPU &fpu) = 0;
virtual int
DoWriteEXC (lldb::tid_t tid, int flavor, const EXC &exc)
{
return -1;
}
DoWriteEXC (lldb::tid_t tid, int flavor, const EXC &exc) = 0;
int
ReadRegisterSet (uint32_t set, bool force);