mirror of
https://github.com/intel/llvm.git
synced 2026-01-17 06:40:01 +08:00
Move SaveFrameZeroState and RestoreSaveFrameZero implementations to Thread base class
llvm-svn: 132586
This commit is contained in:
@@ -751,10 +751,10 @@ protected:
|
||||
SetStopInfo (const lldb::StopInfoSP &stop_info_sp);
|
||||
|
||||
virtual bool
|
||||
SaveFrameZeroState (RegisterCheckpoint &checkpoint) = 0;
|
||||
SaveFrameZeroState (RegisterCheckpoint &checkpoint);
|
||||
|
||||
virtual bool
|
||||
RestoreSaveFrameZero (const RegisterCheckpoint &checkpoint) = 0;
|
||||
RestoreSaveFrameZero (const RegisterCheckpoint &checkpoint);
|
||||
|
||||
virtual lldb_private::Unwind *
|
||||
GetUnwinder () = 0;
|
||||
|
||||
@@ -85,18 +85,6 @@ LinuxThread::GetRegisterContext()
|
||||
return m_reg_context_sp;
|
||||
}
|
||||
|
||||
bool
|
||||
LinuxThread::SaveFrameZeroState(RegisterCheckpoint &checkpoint)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
LinuxThread::RestoreSaveFrameZero(const RegisterCheckpoint &checkpoint)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
lldb::RegisterContextSP
|
||||
LinuxThread::CreateRegisterContextForFrame(lldb_private::StackFrame *frame)
|
||||
{
|
||||
|
||||
@@ -54,13 +54,6 @@ public:
|
||||
|
||||
void Notify(const ProcessMessage &message);
|
||||
|
||||
protected:
|
||||
virtual bool
|
||||
SaveFrameZeroState(RegisterCheckpoint &checkpoint);
|
||||
|
||||
virtual bool
|
||||
RestoreSaveFrameZero(const RegisterCheckpoint &checkpoint);
|
||||
|
||||
private:
|
||||
RegisterContextLinux *
|
||||
GetRegisterContextLinux ()
|
||||
|
||||
@@ -632,35 +632,6 @@ ThreadMacOSX::SetHardwareWatchpoint (const WatchpointLocation *wp)
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
ThreadMacOSX::SaveFrameZeroState (RegisterCheckpoint &checkpoint)
|
||||
{
|
||||
lldb::StackFrameSP frame_sp(GetStackFrameAtIndex (0));
|
||||
if (frame_sp)
|
||||
{
|
||||
checkpoint.SetStackID(frame_sp->GetStackID());
|
||||
return frame_sp->GetRegisterContext()->ReadAllRegisterValues (checkpoint.GetData());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
ThreadMacOSX::RestoreSaveFrameZero (const RegisterCheckpoint &checkpoint)
|
||||
{
|
||||
lldb::StackFrameSP frame_sp(GetStackFrameAtIndex (0));
|
||||
if (frame_sp)
|
||||
{
|
||||
bool ret = frame_sp->GetRegisterContext()->WriteAllRegisterValues (checkpoint.GetData());
|
||||
|
||||
// Clear out all stack frames as our world just changed.
|
||||
ClearStackFrames();
|
||||
frame_sp->GetRegisterContext()->InvalidateIfNeeded(true);
|
||||
|
||||
return ret;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
ThreadMacOSX::ClearHardwareBreakpoint (const BreakpointSite *bp)
|
||||
{
|
||||
|
||||
@@ -118,12 +118,6 @@ public:
|
||||
GetPrivateStopReason ();
|
||||
|
||||
protected:
|
||||
virtual bool
|
||||
SaveFrameZeroState (RegisterCheckpoint &checkpoint);
|
||||
|
||||
virtual bool
|
||||
RestoreSaveFrameZero (const RegisterCheckpoint &checkpoint);
|
||||
|
||||
bool
|
||||
GetIdentifierInfo ();
|
||||
|
||||
|
||||
@@ -221,32 +221,6 @@ ThreadGDBRemote::PrivateSetRegisterValue (uint32_t reg, StringExtractor &respons
|
||||
return gdb_reg_ctx->PrivateSetRegisterValue (reg, response);
|
||||
}
|
||||
|
||||
bool
|
||||
ThreadGDBRemote::SaveFrameZeroState (RegisterCheckpoint &checkpoint)
|
||||
{
|
||||
lldb::StackFrameSP frame_sp(GetStackFrameAtIndex (0));
|
||||
if (frame_sp)
|
||||
{
|
||||
checkpoint.SetStackID(frame_sp->GetStackID());
|
||||
return frame_sp->GetRegisterContext()->ReadAllRegisterValues (checkpoint.GetData());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
ThreadGDBRemote::RestoreSaveFrameZero (const RegisterCheckpoint &checkpoint)
|
||||
{
|
||||
lldb::StackFrameSP frame_sp(GetStackFrameAtIndex (0));
|
||||
if (frame_sp)
|
||||
{
|
||||
bool ret = frame_sp->GetRegisterContext()->WriteAllRegisterValues (checkpoint.GetData());
|
||||
frame_sp->GetRegisterContext()->InvalidateIfNeeded(true);
|
||||
ClearStackFrames();
|
||||
return ret;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
lldb::StopInfoSP
|
||||
ThreadGDBRemote::GetPrivateStopReason ()
|
||||
{
|
||||
|
||||
@@ -99,12 +99,6 @@ protected:
|
||||
|
||||
friend class ProcessGDBRemote;
|
||||
|
||||
virtual bool
|
||||
SaveFrameZeroState (RegisterCheckpoint &checkpoint);
|
||||
|
||||
virtual bool
|
||||
RestoreSaveFrameZero (const RegisterCheckpoint &checkpoint);
|
||||
|
||||
bool
|
||||
PrivateSetRegisterValue (uint32_t reg,
|
||||
StringExtractor &response);
|
||||
|
||||
@@ -1156,7 +1156,34 @@ Thread::GetStackFrameStatus (Stream& strm,
|
||||
source_lines_after);
|
||||
}
|
||||
|
||||
bool
|
||||
Thread::SaveFrameZeroState (RegisterCheckpoint &checkpoint)
|
||||
{
|
||||
lldb::StackFrameSP frame_sp(GetStackFrameAtIndex (0));
|
||||
if (frame_sp)
|
||||
{
|
||||
checkpoint.SetStackID(frame_sp->GetStackID());
|
||||
return frame_sp->GetRegisterContext()->ReadAllRegisterValues (checkpoint.GetData());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
Thread::RestoreSaveFrameZero (const RegisterCheckpoint &checkpoint)
|
||||
{
|
||||
lldb::StackFrameSP frame_sp(GetStackFrameAtIndex (0));
|
||||
if (frame_sp)
|
||||
{
|
||||
bool ret = frame_sp->GetRegisterContext()->WriteAllRegisterValues (checkpoint.GetData());
|
||||
|
||||
// Clear out all stack frames as our world just changed.
|
||||
ClearStackFrames();
|
||||
frame_sp->GetRegisterContext()->InvalidateIfNeeded(true);
|
||||
|
||||
return ret;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#pragma mark "Thread::SettingsController"
|
||||
//--------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user