aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Expression/ClangUserExpression.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2011-05-17 01:10:11 +0000
committerJim Ingham <jingham@apple.com>2011-05-17 01:10:11 +0000
commit160f78c5846c8fe774a1ccfc044d263b7b30ad9c (patch)
tree332b9c5e803a03b373d8609960a5f32b35f48671 /lldb/source/Expression/ClangUserExpression.cpp
parentceee5e813364a34db3ad99926fd05dce69e4bb44 (diff)
downloadllvm-160f78c5846c8fe774a1ccfc044d263b7b30ad9c.zip
llvm-160f78c5846c8fe774a1ccfc044d263b7b30ad9c.tar.gz
llvm-160f78c5846c8fe774a1ccfc044d263b7b30ad9c.tar.bz2
Fix the error message when an expression evaluation is interrupted by a crash/breakpoint hit to
give the reason for the interrupt. Also make sure it we don't want to unwind from the evaluation we print something if it is interrupted. llvm-svn: 131448
Diffstat (limited to 'lldb/source/Expression/ClangUserExpression.cpp')
-rw-r--r--lldb/source/Expression/ClangUserExpression.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp
index 6eafd7b..563c28a 100644
--- a/lldb/source/Expression/ClangUserExpression.cpp
+++ b/lldb/source/Expression/ClangUserExpression.cpp
@@ -504,7 +504,7 @@ ClangUserExpression::Execute (Stream &error_stream,
lldb::addr_t function_stack_pointer = static_cast<ThreadPlanCallFunction *>(call_plan_sp.get())->GetFunctionStackPointer();
- call_plan_sp->SetPrivate(true);
+ // call_plan_sp->SetPrivate(true);
uint32_t single_thread_timeout_usec = 500000;
@@ -524,10 +524,23 @@ ClangUserExpression::Execute (Stream &error_stream,
if (execution_result == eExecutionInterrupted)
{
+ const char *error_desc = NULL;
+
+ if (call_plan_sp)
+ {
+ lldb::StopInfoSP real_stop_info_sp = call_plan_sp->GetRealStopInfo();
+ if (real_stop_info_sp)
+ error_desc = real_stop_info_sp->GetDescription();
+ }
+ if (error_desc)
+ error_stream.Printf ("Execution was interrupted, reason: %s.", error_desc);
+ else
+ error_stream.Printf ("Execution was interrupted.", error_desc);
+
if (discard_on_error)
- error_stream.Printf ("Expression execution was interrupted. The process has been returned to the state before execution.");
+ error_stream.Printf ("\nThe process has been returned to the state before execution.");
else
- error_stream.Printf ("Expression execution was interrupted. The process has been left at the point where it was interrupted.");
+ error_stream.Printf ("\nThe process has been left at the point where it was interrupted.");
return execution_result;
}