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/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp
index c919653..e097eb0 100644
--- a/lldb/source/Expression/ClangUserExpression.cpp
+++ b/lldb/source/Expression/ClangUserExpression.cpp
@@ -41,7 +41,7 @@
#include "lldb/Symbol/VariableList.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/ThreadPlan.h"
#include "lldb/Target/ThreadPlanCallUserExpression.h"
@@ -119,7 +119,7 @@
return;
}
- StackFrame *frame = exe_ctx.GetFramePtr();
+ Frame *frame = exe_ctx.GetFramePtr();
if (frame == NULL)
{
if (log)
@@ -329,7 +329,7 @@
{
m_process_wp = exe_ctx.GetProcessSP();
- lldb::StackFrameSP frame_sp = exe_ctx.GetFrameSP();
+ lldb::FrameSP frame_sp = exe_ctx.GetFrameSP();
if (frame_sp)
m_address = frame_sp->GetFrameCodeAddress();
@@ -339,7 +339,7 @@
ClangUserExpression::LockAndCheckContext (ExecutionContext &exe_ctx,
lldb::TargetSP &target_sp,
lldb::ProcessSP &process_sp,
- lldb::StackFrameSP &frame_sp)
+ lldb::FrameSP &frame_sp)
{
lldb::ProcessSP expected_process_sp = m_process_wp.lock();
process_sp = exe_ctx.GetProcessSP();
@@ -367,7 +367,7 @@
{
lldb::TargetSP target_sp;
lldb::ProcessSP process_sp;
- lldb::StackFrameSP frame_sp;
+ lldb::FrameSP frame_sp;
return LockAndCheckContext(exe_ctx, target_sp, process_sp, frame_sp);
}
@@ -558,7 +558,7 @@
}
static lldb::addr_t
-GetObjectPointer (lldb::StackFrameSP frame_sp,
+GetObjectPointer (lldb::FrameSP frame_sp,
ConstString &object_name,
Error &err)
{
@@ -575,11 +575,11 @@
valobj_sp = frame_sp->GetValueForVariableExpressionPath(object_name.AsCString(),
lldb::eNoDynamicValues,
- StackFrame::eExpressionPathOptionCheckPtrVsMember ||
- StackFrame::eExpressionPathOptionsAllowDirectIVarAccess ||
- StackFrame::eExpressionPathOptionsNoFragileObjcIvar ||
- StackFrame::eExpressionPathOptionsNoSyntheticChildren ||
- StackFrame::eExpressionPathOptionsNoSyntheticArrayRange,
+ Frame::eExpressionPathOptionCheckPtrVsMember ||
+ Frame::eExpressionPathOptionsAllowDirectIVarAccess ||
+ Frame::eExpressionPathOptionsNoFragileObjcIvar ||
+ Frame::eExpressionPathOptionsNoSyntheticChildren ||
+ Frame::eExpressionPathOptionsNoSyntheticArrayRange,
var_sp,
err);
@@ -606,7 +606,7 @@
{
lldb::TargetSP target;
lldb::ProcessSP process;
- lldb::StackFrameSP frame;
+ lldb::FrameSP frame;
if (!LockAndCheckContext(exe_ctx,
target,