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/Plugins/Process/Utility/InferiorCallPOSIX.cpp b/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
index 8b22d64..b020db8 100644
--- a/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
+++ b/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
@@ -109,7 +109,7 @@
                     call_plan_sp->SetIsMasterPlan (true);
                     call_plan_sp->SetOkayToDiscard(true);
                     
-                    StackFrame *frame = thread->GetStackFrameAtIndex (0).get();
+                    Frame *frame = thread->GetStackFrameAtIndex (0).get();
                     if (frame)
                     {
                         ExecutionContext exe_ctx;
@@ -195,7 +195,7 @@
                    call_plan_sp->SetIsMasterPlan (true);
                    call_plan_sp->SetOkayToDiscard(true);
                    
-                   StackFrame *frame = thread->GetStackFrameAtIndex (0).get();
+                   Frame *frame = thread->GetStackFrameAtIndex (0).get();
                    if (frame)
                    {
                        ExecutionContext exe_ctx;
@@ -249,7 +249,7 @@
         call_plan_sp->SetIsMasterPlan (true);
         call_plan_sp->SetOkayToDiscard(true);
 
-        StackFrame *frame = thread->GetStackFrameAtIndex (0).get();
+        Frame *frame = thread->GetStackFrameAtIndex (0).get();
         if (frame)
         {
             ExecutionContext exe_ctx;
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDummy.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDummy.cpp
index 1e282ce..08be777 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextDummy.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextDummy.cpp
@@ -25,7 +25,7 @@
 #include "lldb/Target/ABI.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Process.h"
-#include "lldb/Target/StackFrame.h"
+#include "lldb/Target/Frame.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/DynamicLoader.h"
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
index c19aec3..92ec99f 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
@@ -26,7 +26,7 @@
 #include "lldb/Target/ABI.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Process.h"
-#include "lldb/Target/StackFrame.h"
+#include "lldb/Target/Frame.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/DynamicLoader.h"
diff --git a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
index 51d2052..52d7f17 100644
--- a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
+++ b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
@@ -335,7 +335,7 @@
 //                        {
 //                            // We have a SIGTRAP, make sure we didn't exec by checking
 //                            // for the PC being at "_dyld_start"...
-//                            lldb::StackFrameSP frame_sp (thread.GetStackFrameAtIndex(0));
+//                            lldb::FrameSP frame_sp (thread.GetStackFrameAtIndex(0));
 //                            if (frame_sp)
 //                            {
 //                                const Symbol *symbol = frame_sp->GetSymbolContext(eSymbolContextSymbol).symbol;
diff --git a/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp b/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp
index 56e5a9a..9ab437d 100644
--- a/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp
+++ b/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp
@@ -78,7 +78,7 @@
 }
 
 RegisterContextSP
-ThreadMemory::CreateRegisterContextForFrame (StackFrame *frame)
+ThreadMemory::CreateRegisterContextForFrame (Frame *frame)
 {
     RegisterContextSP reg_ctx_sp;
     uint32_t concrete_frame_idx = 0;
diff --git a/lldb/source/Plugins/Process/Utility/ThreadMemory.h b/lldb/source/Plugins/Process/Utility/ThreadMemory.h
index 07eb45d..a45c056 100644
--- a/lldb/source/Plugins/Process/Utility/ThreadMemory.h
+++ b/lldb/source/Plugins/Process/Utility/ThreadMemory.h
@@ -37,7 +37,7 @@
     GetRegisterContext ();
 
     virtual lldb::RegisterContextSP
-    CreateRegisterContextForFrame (lldb_private::StackFrame *frame);
+    CreateRegisterContextForFrame (lldb_private::Frame *frame);
 
     virtual bool
     CalculateStopInfo ();
diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
index 552ae50..111c5d8 100644
--- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
+++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
@@ -220,7 +220,7 @@
 }
 
 lldb::RegisterContextSP
-UnwindLLDB::DoCreateRegisterContextForFrame (StackFrame *frame)
+UnwindLLDB::DoCreateRegisterContextForFrame (Frame *frame)
 {
     lldb::RegisterContextSP reg_ctx_sp;
     uint32_t idx = frame->GetConcreteFrameIndex ();
diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.h b/lldb/source/Plugins/Process/Utility/UnwindLLDB.h
index 5725654..23f04be 100644
--- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.h
+++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.h
@@ -75,7 +75,7 @@
                          lldb::addr_t& start_pc);
     
     lldb::RegisterContextSP
-    DoCreateRegisterContextForFrame (lldb_private::StackFrame *frame);
+    DoCreateRegisterContextForFrame (lldb_private::Frame *frame);
 
     typedef std::shared_ptr<RegisterContextLLDB> RegisterContextLLDBSP;
 
diff --git a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
index d011314..fa76d6d 100644
--- a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
+++ b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
@@ -73,7 +73,7 @@
 }
     
 lldb::RegisterContextSP
-UnwindMacOSXFrameBackchain::DoCreateRegisterContextForFrame (StackFrame *frame)
+UnwindMacOSXFrameBackchain::DoCreateRegisterContextForFrame (Frame *frame)
 {
     lldb::RegisterContextSP reg_ctx_sp;
     uint32_t concrete_idx = frame->GetConcreteFrameIndex ();
@@ -88,7 +88,7 @@
 {
     m_cursors.clear();
     
-    StackFrame *first_frame = exe_ctx.GetFramePtr();
+    Frame *first_frame = exe_ctx.GetFramePtr();
 
     Process *process = exe_ctx.GetProcessPtr();
     if (process == NULL)
@@ -191,7 +191,7 @@
     if (process == NULL)
         return 0;
     
-    StackFrame *first_frame = exe_ctx.GetFramePtr();
+    Frame *first_frame = exe_ctx.GetFramePtr();
 
     std::pair<lldb::addr_t, lldb::addr_t> fp_pc_pair;
 
diff --git a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h
index 2695376..501c9ea 100644
--- a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h
+++ b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h
@@ -46,7 +46,7 @@
                          lldb::addr_t& pc);
     
     lldb::RegisterContextSP
-    DoCreateRegisterContextForFrame (lldb_private::StackFrame *frame);
+    DoCreateRegisterContextForFrame (lldb_private::Frame *frame);
 
     friend class RegisterContextMacOSXFrameBackchain;