summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandObjectCall.cpp6
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp14
2 files changed, 16 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectCall.cpp b/lldb/source/Commands/CommandObjectCall.cpp
index 9a1a7977d78..11dab9b710f 100644
--- a/lldb/source/Commands/CommandObjectCall.cpp
+++ b/lldb/source/Commands/CommandObjectCall.cpp
@@ -292,20 +292,20 @@ CommandObjectCall::Execute
}
}
- ClangFunction::ExecutionResults return_status;
+ Process::ExecutionResults return_status;
Value return_value;
bool stop_others = true;
return_status = clang_fun.ExecuteFunction(exe_ctx, errors, stop_others, NULL, return_value);
// Now figure out what to do with the return value.
- if (return_status == ClangFunction::eExecutionSetupError)
+ if (return_status == Process::eExecutionSetupError)
{
result.AppendErrorWithFormat("Error setting up function execution: '%s'.\n", errors.GetData());
result.SetStatus (eReturnStatusFailed);
return false;
}
- else if (return_status != ClangFunction::eExecutionCompleted)
+ else if (return_status != Process::eExecutionCompleted)
{
result.AppendWarningWithFormat("Interrupted while calling function: '%s'.\n", errors.GetData());
result.SetStatus(eReturnStatusSuccessFinishNoResult);
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 32236f8c917..c58f3f529c8 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -13,6 +13,7 @@
// C++ Includes
// Other libraries and framework includes
// Project includes
+#include "CommandObjectThread.h" // For DisplayThreadInfo.
#include "lldb/Interpreter/Args.h"
#include "lldb/Core/Value.h"
#include "lldb/Core/InputReader.h"
@@ -242,7 +243,8 @@ CommandObjectExpression::EvaluateExpression
if (m_exe_ctx.target)
prefix = m_exe_ctx.target->GetExpressionPrefixContentsAsCString();
- lldb::ValueObjectSP result_valobj_sp (ClangUserExpression::Evaluate (m_exe_ctx, m_options.unwind_on_error, expr, prefix));
+ lldb::ValueObjectSP result_valobj_sp;
+ Process::ExecutionResults execution_results = ClangUserExpression::Evaluate (m_exe_ctx, m_options.unwind_on_error, expr, prefix, result_valobj_sp);
assert (result_valobj_sp.get());
if (result_valobj_sp->GetError().Success())
{
@@ -267,6 +269,16 @@ CommandObjectExpression::EvaluateExpression
else
{
error_stream.PutCString(result_valobj_sp->GetError().AsCString());
+ // If we've been interrupted, display state information.
+ if (execution_results == Process::eExecutionInterrupted && !m_options.unwind_on_error)
+ {
+ if (m_exe_ctx.thread)
+ lldb_private::DisplayThreadInfo (m_interpreter, result->GetOutputStream(), m_exe_ctx.thread, false, true);
+ else
+ {
+ lldb_private::DisplayThreadsInfo (m_interpreter, &m_exe_ctx, *result, true, true);
+ }
+ }
if (result)
result->SetStatus (eReturnStatusFailed);
}
OpenPOWER on IntegriCloud