[Lldb-commits] [lldb] r251564 - Change Target::EvaluateExpression to take an ExecutionContextScope * rather than a
Jim Ingham via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 28 15:23:17 PDT 2015
Author: jingham
Date: Wed Oct 28 17:23:17 2015
New Revision: 251564
URL: http://llvm.org/viewvc/llvm-project?rev=251564&view=rev
Log:
Change Target::EvaluateExpression to take an ExecutionContextScope * rather than a
StackFrame * (StackFrame is an ExecutionContextScope.) That allows you to call an
expression on a particular Thread, but not using the context of any particular frame.
That in turn is useful for injecting utility functions that don't actually depend on
locals/self/etc of the current frame.
I also had to include StackFrame.h in a couple of places so the compiler knew
how to downcast StackFrame to ExecutionContextScope.
<rdar://problem/22852953>
Modified:
lldb/trunk/include/lldb/Target/Target.h
lldb/trunk/source/Plugins/Language/ObjC/CF.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp
lldb/trunk/source/Target/Target.cpp
Modified: lldb/trunk/include/lldb/Target/Target.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Target.h?rev=251564&r1=251563&r2=251564&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Target.h (original)
+++ lldb/trunk/include/lldb/Target/Target.h Wed Oct 28 17:23:17 2015
@@ -1381,7 +1381,7 @@ public:
// in in th execution context.
lldb::ExpressionResults
EvaluateExpression (const char *expression,
- StackFrame *frame,
+ ExecutionContextScope *exe_scope,
lldb::ValueObjectSP &result_valobj_sp,
const EvaluateExpressionOptions& options = EvaluateExpressionOptions());
Modified: lldb/trunk/source/Plugins/Language/ObjC/CF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/CF.cpp?rev=251564&r1=251563&r2=251564&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/CF.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/CF.cpp Wed Oct 28 17:23:17 2015
@@ -19,6 +19,7 @@
#include "lldb/Symbol/ClangASTContext.h"
#include "lldb/Target/Language.h"
#include "lldb/Target/ObjCLanguageRuntime.h"
+#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Target.h"
using namespace lldb;
Modified: lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp?rev=251564&r1=251563&r2=251564&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp Wed Oct 28 17:23:17 2015
@@ -27,6 +27,7 @@
#include "lldb/Symbol/ClangASTContext.h"
#include "lldb/Target/Language.h"
#include "lldb/Target/ObjCLanguageRuntime.h"
+#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Target.h"
using namespace lldb;
Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=251564&r1=251563&r2=251564&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Wed Oct 28 17:23:17 2015
@@ -2165,7 +2165,7 @@ Target::GetTargetFromContexts (const Exe
ExpressionResults
Target::EvaluateExpression(const char *expr_cstr,
- StackFrame *frame,
+ ExecutionContextScope *exe_scope,
lldb::ValueObjectSP &result_valobj_sp,
const EvaluateExpressionOptions& options)
{
@@ -2183,9 +2183,9 @@ Target::EvaluateExpression(const char *e
ExecutionContext exe_ctx;
- if (frame)
+ if (exe_scope)
{
- frame->CalculateExecutionContext(exe_ctx);
+ exe_scope->CalculateExecutionContext(exe_ctx);
}
else if (m_process_sp)
{
More information about the lldb-commits
mailing list