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
diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp
index 0c3a17e..c972ce8 100644
--- a/lldb/source/API/SBThread.cpp
+++ b/lldb/source/API/SBThread.cpp
@@ -594,7 +594,7 @@
{
Thread *thread = exe_ctx.GetThreadPtr();
bool abort_other_plans = false;
- StackFrameSP frame_sp(thread->GetStackFrameAtIndex (0));
+ FrameSP frame_sp(thread->GetStackFrameAtIndex (0));
ThreadPlanSP new_plan_sp;
if (frame_sp)
@@ -645,7 +645,7 @@
bool abort_other_plans = false;
Thread *thread = exe_ctx.GetThreadPtr();
- StackFrameSP frame_sp(thread->GetStackFrameAtIndex (0));
+ FrameSP frame_sp(thread->GetStackFrameAtIndex (0));
ThreadPlanSP new_plan_sp;
if (frame_sp && frame_sp->HasDebugInformation ())
@@ -711,7 +711,7 @@
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
- StackFrameSP frame_sp (sb_frame.GetFrameSP());
+ FrameSP frame_sp (sb_frame.GetFrameSP());
if (log)
{
SBStream frame_desc_strm;
@@ -801,7 +801,7 @@
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
- StackFrameSP frame_sp (sb_frame.GetFrameSP());
+ FrameSP frame_sp (sb_frame.GetFrameSP());
if (log)
{
@@ -1112,7 +1112,7 @@
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFrame sb_frame;
- StackFrameSP frame_sp;
+ FrameSP frame_sp;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@@ -1148,7 +1148,7 @@
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFrame sb_frame;
- StackFrameSP frame_sp;
+ FrameSP frame_sp;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);
@@ -1184,7 +1184,7 @@
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
SBFrame sb_frame;
- StackFrameSP frame_sp;
+ FrameSP frame_sp;
Mutex::Locker api_locker;
ExecutionContext exe_ctx (m_opaque_sp.get(), api_locker);