aboutsummaryrefslogtreecommitdiffstats
path: root/source/Expression/FunctionCaller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Expression/FunctionCaller.cpp')
-rw-r--r--source/Expression/FunctionCaller.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/source/Expression/FunctionCaller.cpp b/source/Expression/FunctionCaller.cpp
index 618c1a13212c..203cfff63d80 100644
--- a/source/Expression/FunctionCaller.cpp
+++ b/source/Expression/FunctionCaller.cpp
@@ -217,9 +217,8 @@ bool FunctionCaller::InsertFunction(ExecutionContext &exe_ctx,
return false;
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
- if (log)
- log->Printf("Call Address: 0x%" PRIx64 " Struct Address: 0x%" PRIx64 ".\n",
- m_jit_start_addr, args_addr_ref);
+ LLDB_LOGF(log, "Call Address: 0x%" PRIx64 " Struct Address: 0x%" PRIx64 ".\n",
+ m_jit_start_addr, args_addr_ref);
return true;
}
@@ -231,10 +230,10 @@ lldb::ThreadPlanSP FunctionCaller::GetThreadPlanToCallFunction(
Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_EXPRESSIONS |
LIBLLDB_LOG_STEP));
- if (log)
- log->Printf("-- [FunctionCaller::GetThreadPlanToCallFunction] Creating "
- "thread plan to call function \"%s\" --",
- m_name.c_str());
+ LLDB_LOGF(log,
+ "-- [FunctionCaller::GetThreadPlanToCallFunction] Creating "
+ "thread plan to call function \"%s\" --",
+ m_name.c_str());
// FIXME: Use the errors Stream for better error reporting.
Thread *thread = exe_ctx.GetThreadPtr();
@@ -271,10 +270,10 @@ bool FunctionCaller::FetchFunctionResults(ExecutionContext &exe_ctx,
Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_EXPRESSIONS |
LIBLLDB_LOG_STEP));
- if (log)
- log->Printf("-- [FunctionCaller::FetchFunctionResults] Fetching function "
- "results for \"%s\"--",
- m_name.c_str());
+ LLDB_LOGF(log,
+ "-- [FunctionCaller::FetchFunctionResults] Fetching function "
+ "results for \"%s\"--",
+ m_name.c_str());
Process *process = exe_ctx.GetProcessPtr();
@@ -341,10 +340,9 @@ lldb::ExpressionResults FunctionCaller::ExecuteFunction(
Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_EXPRESSIONS |
LIBLLDB_LOG_STEP));
- if (log)
- log->Printf(
- "== [FunctionCaller::ExecuteFunction] Executing function \"%s\" ==",
- m_name.c_str());
+ LLDB_LOGF(log,
+ "== [FunctionCaller::ExecuteFunction] Executing function \"%s\" ==",
+ m_name.c_str());
lldb::ThreadPlanSP call_plan_sp = GetThreadPlanToCallFunction(
exe_ctx, args_addr, real_options, diagnostic_manager);
@@ -362,13 +360,15 @@ lldb::ExpressionResults FunctionCaller::ExecuteFunction(
if (log) {
if (return_value != lldb::eExpressionCompleted) {
- log->Printf("== [FunctionCaller::ExecuteFunction] Execution of \"%s\" "
- "completed abnormally ==",
- m_name.c_str());
+ LLDB_LOGF(log,
+ "== [FunctionCaller::ExecuteFunction] Execution of \"%s\" "
+ "completed abnormally ==",
+ m_name.c_str());
} else {
- log->Printf("== [FunctionCaller::ExecuteFunction] Execution of \"%s\" "
- "completed normally ==",
- m_name.c_str());
+ LLDB_LOGF(log,
+ "== [FunctionCaller::ExecuteFunction] Execution of \"%s\" "
+ "completed normally ==",
+ m_name.c_str());
}
}