summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectExpression.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2016-10-17 23:59:41 +0000
committerJim Ingham <jingham@apple.com>2016-10-17 23:59:41 +0000
commit981da8d37bab92f306a86bd8b348c7e6b3797c08 (patch)
tree73d6fb565165df7bdc7fe7ac04ba293752a6ce5f /lldb/source/Commands/CommandObjectExpression.cpp
parent0d31d9c012797a50ed99ff0b1e77ff38f1cf94d1 (diff)
downloadbcm5719-llvm-981da8d37bab92f306a86bd8b348c7e6b3797c08.tar.gz
bcm5719-llvm-981da8d37bab92f306a86bd8b348c7e6b3797c08.zip
Fix a crash in expressions with fixits in the dummy target.
In the expression command, if the target is NULL, you have to use the dummy target. <rdar://problem/28811687> llvm-svn: 284439
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 56aae93a93f..ba477cd5f4c 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -614,6 +614,9 @@ bool CommandObjectExpression::DoExecute(const char *command,
if (EvaluateExpression(expr, &(result.GetOutputStream()),
&(result.GetErrorStream()), &result)) {
Target *target = m_interpreter.GetExecutionContext().GetTargetPtr();
+ if (!target)
+ target = GetDummyTarget();
+
if (!m_fixed_expression.empty() && target->GetEnableNotifyAboutFixIts()) {
CommandHistory &history = m_interpreter.GetCommandHistory();
// FIXME: Can we figure out what the user actually typed (e.g. some alias
OpenPOWER on IntegriCloud