summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ExecutionContext.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2013-11-02 02:23:02 +0000
committerJason Molenda <jmolenda@apple.com>2013-11-02 02:23:02 +0000
commitf23bf7432cfe632976bf9004707cf8133f30e3e1 (patch)
tree7c999f09d60866c9bea2a4dd8bc1caaa165d1877 /lldb/source/Target/ExecutionContext.cpp
parent30bfa3623b6ec59fc03cba486040eef77cd5f847 (diff)
downloadbcm5719-llvm-f23bf7432cfe632976bf9004707cf8133f30e3e1.tar.gz
bcm5719-llvm-f23bf7432cfe632976bf9004707cf8133f30e3e1.zip
Add a new base class, Frame. It is a pure virtual function which
defines a protocol that all subclasses will implement. StackFrame is currently the only subclass and the methods that Frame vends are nearly identical to StackFrame's old methods. Update all callers to use Frame*/Frame& instead of pointers to StackFrames. This is almost entirely a mechanical change that touches a lot of the code base so I'm committing it alone. No new functionality is added with this patch, no new subclasses of Frame exist yet. I'll probably need to tweak some of the separation, possibly moving some of StackFrame's methods up in to Frame, but this is a good starting point. <rdar://problem/15314068> llvm-svn: 193907
Diffstat (limited to 'lldb/source/Target/ExecutionContext.cpp')
-rw-r--r--lldb/source/Target/ExecutionContext.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/lldb/source/Target/ExecutionContext.cpp b/lldb/source/Target/ExecutionContext.cpp
index 7a8b60189bc..ee42e845f14 100644
--- a/lldb/source/Target/ExecutionContext.cpp
+++ b/lldb/source/Target/ExecutionContext.cpp
@@ -11,7 +11,7 @@
#include "lldb/Core/State.h"
#include "lldb/Target/ExecutionContextScope.h"
-#include "lldb/Target/StackFrame.h"
+#include "lldb/Target/Frame.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
@@ -64,7 +64,7 @@ ExecutionContext::ExecutionContext (const lldb::ThreadSP &thread_sp) :
SetContext (thread_sp);
}
-ExecutionContext::ExecutionContext (const lldb::StackFrameSP &frame_sp) :
+ExecutionContext::ExecutionContext (const lldb::FrameSP &frame_sp) :
m_target_sp (),
m_process_sp (),
m_thread_sp (),
@@ -107,13 +107,13 @@ ExecutionContext::ExecutionContext (const lldb::ThreadWP &thread_wp) :
SetContext (thread_sp);
}
-ExecutionContext::ExecutionContext (const lldb::StackFrameWP &frame_wp) :
+ExecutionContext::ExecutionContext (const lldb::FrameWP &frame_wp) :
m_target_sp (),
m_process_sp (),
m_thread_sp (),
m_frame_sp ()
{
- lldb::StackFrameSP frame_sp(frame_wp.lock());
+ lldb::FrameSP frame_sp(frame_wp.lock());
if (frame_sp)
SetContext (frame_sp);
}
@@ -136,7 +136,7 @@ ExecutionContext::ExecutionContext (Target* t, bool fill_current_process_thread_
}
}
-ExecutionContext::ExecutionContext(Process* process, Thread *thread, StackFrame *frame) :
+ExecutionContext::ExecutionContext(Process* process, Thread *thread, Frame *frame) :
m_target_sp (),
m_process_sp (process->shared_from_this()),
m_thread_sp (thread->shared_from_this()),
@@ -320,7 +320,7 @@ ExecutionContext::GetThreadRef () const
return *m_thread_sp;
}
-StackFrame &
+Frame &
ExecutionContext::GetFrameRef () const
{
#if defined (LLDB_CONFIGURATION_DEBUG) || defined (LLDB_CONFIGURATION_RELEASE)
@@ -348,7 +348,7 @@ ExecutionContext::SetThreadSP (const lldb::ThreadSP &thread_sp)
}
void
-ExecutionContext::SetFrameSP (const lldb::StackFrameSP &frame_sp)
+ExecutionContext::SetFrameSP (const lldb::FrameSP &frame_sp)
{
m_frame_sp = frame_sp;
}
@@ -381,7 +381,7 @@ ExecutionContext::SetThreadPtr (Thread *thread)
}
void
-ExecutionContext::SetFramePtr (StackFrame *frame)
+ExecutionContext::SetFramePtr (Frame *frame)
{
if (frame)
m_frame_sp = frame->shared_from_this();
@@ -434,7 +434,7 @@ ExecutionContext::SetContext (const lldb::ThreadSP &thread_sp)
}
void
-ExecutionContext::SetContext (const lldb::StackFrameSP &frame_sp)
+ExecutionContext::SetContext (const lldb::FrameSP &frame_sp)
{
m_frame_sp = frame_sp;
if (frame_sp)
@@ -606,7 +606,7 @@ ExecutionContextRef::operator =(const ExecutionContext &exe_ctx)
m_tid = thread_sp->GetID();
else
m_tid = LLDB_INVALID_THREAD_ID;
- lldb::StackFrameSP frame_sp (exe_ctx.GetFrameSP());
+ lldb::FrameSP frame_sp (exe_ctx.GetFrameSP());
if (frame_sp)
m_stack_id = frame_sp->GetStackID();
else
@@ -666,7 +666,7 @@ ExecutionContextRef::SetThreadSP (const lldb::ThreadSP &thread_sp)
}
void
-ExecutionContextRef::SetFrameSP (const lldb::StackFrameSP &frame_sp)
+ExecutionContextRef::SetFrameSP (const lldb::FrameSP &frame_sp)
{
if (frame_sp)
{
@@ -711,7 +711,7 @@ ExecutionContextRef::SetTargetPtr (Target* target, bool adopt_selected)
if (thread_sp)
{
SetThreadSP (thread_sp);
- lldb::StackFrameSP frame_sp (thread_sp->GetSelectedFrame());
+ lldb::FrameSP frame_sp (thread_sp->GetSelectedFrame());
if (!frame_sp)
frame_sp = thread_sp->GetStackFrameAtIndex(0);
if (frame_sp)
@@ -755,7 +755,7 @@ ExecutionContextRef::SetThreadPtr (Thread *thread)
}
void
-ExecutionContextRef::SetFramePtr (StackFrame *frame)
+ExecutionContextRef::SetFramePtr (Frame *frame)
{
if (frame)
SetFrameSP (frame->shared_from_this());
@@ -811,7 +811,7 @@ ExecutionContextRef::GetThreadSP () const
return thread_sp;
}
-lldb::StackFrameSP
+lldb::FrameSP
ExecutionContextRef::GetFrameSP () const
{
if (m_stack_id.IsValid())
@@ -820,7 +820,7 @@ ExecutionContextRef::GetFrameSP () const
if (thread_sp)
return thread_sp->GetFrameWithStackID (m_stack_id);
}
- return lldb::StackFrameSP();
+ return lldb::FrameSP();
}
ExecutionContext
OpenPOWER on IntegriCloud