summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2013-03-06 19:57:25 +0000
committerSean Callanan <scallanan@apple.com>2013-03-06 19:57:25 +0000
commitf58b12d8ebc6721956d1a873e9d775746dfd6fd0 (patch)
tree802d2ad625a7b02e1e246b44a785d599f95ad670 /lldb/source/Expression
parent60cdeb6aa8651f9bbf3a61d088e4153729d1c801 (diff)
downloadbcm5719-llvm-f58b12d8ebc6721956d1a873e9d775746dfd6fd0.tar.gz
bcm5719-llvm-f58b12d8ebc6721956d1a873e9d775746dfd6fd0.zip
Added a little bit of logging to ClangFunction to
make it more obvious what's going on. llvm-svn: 176575
Diffstat (limited to 'lldb/source/Expression')
-rw-r--r--lldb/source/Expression/ClangFunction.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/lldb/source/Expression/ClangFunction.cpp b/lldb/source/Expression/ClangFunction.cpp
index d749b1410f7..794e035287b 100644
--- a/lldb/source/Expression/ClangFunction.cpp
+++ b/lldb/source/Expression/ClangFunction.cpp
@@ -407,6 +407,11 @@ ClangFunction::GetThreadPlanToCallFunction (ExecutionContext &exe_ctx,
lldb::addr_t *this_arg,
lldb::addr_t *cmd_arg)
{
+ lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
+
+ if (log)
+ log->Printf("-- [ClangFunction::GetThreadPlanToCallFunction] Creating thread plan to call function --");
+
// FIXME: Use the errors Stream for better error reporting.
Thread *thread = exe_ctx.GetThreadPtr();
if (thread == NULL)
@@ -439,6 +444,12 @@ ClangFunction::FetchFunctionResults (ExecutionContext &exe_ctx, lldb::addr_t arg
// FIXME: How does clang tell us there's no return value? We need to handle that case.
// FIXME: Create our ThreadPlanCallFunction with the return ClangASTType, and then use GetReturnValueObject
// to fetch the value. That way we can fetch any values we need.
+
+ lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
+
+ if (log)
+ log->Printf("-- [ClangFunction::FetchFunctionResults] Fetching function results --");
+
Process *process = exe_ctx.GetProcessPtr();
if (process == NULL)
@@ -516,7 +527,12 @@ ClangFunction::ExecuteFunction (
Stream &errors,
lldb::addr_t *this_arg)
{
- lldb::ThreadPlanSP call_plan_sp (ClangFunction::GetThreadPlanToCallFunction (exe_ctx,
+ lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
+
+ if (log)
+ log->Printf("== [ClangFunction::ExecuteFunction] Executing function ==");
+
+ lldb::ThreadPlanSP call_plan_sp (ClangFunction::GetThreadPlanToCallFunction (exe_ctx,
function_address,
void_arg,
errors,
@@ -540,6 +556,18 @@ ClangFunction::ExecuteFunction (
timeout_usec,
errors);
+ if (log)
+ {
+ if (results != eExecutionCompleted)
+ {
+ log->Printf("== [ClangFunction::ExecuteFunction] Execution completed abnormally ==");
+ }
+ else
+ {
+ log->Printf("== [ClangFunction::ExecuteFunction] Execution completed normally ==");
+ }
+ }
+
if (exe_ctx.GetProcessPtr())
exe_ctx.GetProcessPtr()->SetRunningUserExpression(false);
OpenPOWER on IntegriCloud