summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectExpression.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-01-27 18:18:23 +0000
committerGreg Clayton <gclayton@apple.com>2012-01-27 18:18:23 +0000
commita73d26929449a8cb7a67e2914c34c74cd6e00188 (patch)
treeec7a45ac0bee9c459e31fb0f492d3d74c8d69577 /lldb/source/Commands/CommandObjectExpression.cpp
parente3f6b5ce48f3c6ab22b266fa43ec2d99a932c898 (diff)
downloadbcm5719-llvm-a73d26929449a8cb7a67e2914c34c74cd6e00188.tar.gz
bcm5719-llvm-a73d26929449a8cb7a67e2914c34c74cd6e00188.zip
There is no need to hold onto an ExecutionContext as a member variable.
ExecutionContext objects have shared pointers to Target, Process, Thread and Frame objects and they can end up being held onto for too long. llvm-svn: 149133
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 301ce82c9d6..262d0b58dcf 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -282,7 +282,7 @@ CommandObjectExpression::EvaluateExpression
CommandReturnObject *result
)
{
- Target *target = m_exe_ctx.GetTargetPtr();
+ Target *target = m_interpreter.GetExecutionContext().GetTargetPtr();
if (!target)
target = Host::GetDummyTarget(m_interpreter.GetDebugger()).get();
@@ -310,7 +310,7 @@ CommandObjectExpression::EvaluateExpression
}
exe_results = target->EvaluateExpression (expr,
- m_exe_ctx.GetFramePtr(),
+ m_interpreter.GetExecutionContext().GetFramePtr(),
eExecutionPolicyOnlyWhenNeeded,
m_command_options.print_object,
m_command_options.unwind_on_error,
@@ -323,7 +323,7 @@ CommandObjectExpression::EvaluateExpression
uint32_t start_frame = 0;
uint32_t num_frames = 1;
uint32_t num_frames_with_source = 0;
- Thread *thread = m_exe_ctx.GetThreadPtr();
+ Thread *thread = m_interpreter.GetExecutionContext().GetThreadPtr();
if (thread)
{
thread->GetStatus (result->GetOutputStream(),
@@ -333,7 +333,7 @@ CommandObjectExpression::EvaluateExpression
}
else
{
- Process *process = m_exe_ctx.GetProcessPtr();
+ Process *process = m_interpreter.GetExecutionContext().GetProcessPtr();
if (process)
{
bool only_threads_with_stop_reason = true;
@@ -422,8 +422,6 @@ CommandObjectExpression::ExecuteRawCommandString
CommandReturnObject &result
)
{
- m_exe_ctx = m_interpreter.GetExecutionContext();
-
m_option_group.NotifyOptionParsingStarting();
const char * expr = NULL;
OpenPOWER on IntegriCloud