[Lldb-commits] [lldb] r145625 - /lldb/trunk/source/Target/Process.cpp
Jim Ingham
jingham at apple.com
Thu Dec 1 12:26:15 PST 2011
Author: jingham
Date: Thu Dec 1 14:26:15 2011
New Revision: 145625
URL: http://llvm.org/viewvc/llvm-project?rev=145625&view=rev
Log:
Protect a few log->Printf calls with "if (log)"...
Modified:
lldb/trunk/source/Target/Process.cpp
Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=145625&r1=145624&r2=145625&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Thu Dec 1 14:26:15 2011
@@ -3231,7 +3231,8 @@
if (curr_thread_list.GetSize() != num_threads)
{
lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP | LIBLLDB_LOG_PROCESS));
- log->Printf("Number of threads changed from %d to %d while processing event.", num_threads, curr_thread_list.GetSize());
+ if (log)
+ log->Printf("Number of threads changed from %d to %d while processing event.", num_threads, curr_thread_list.GetSize());
break;
}
@@ -3240,10 +3241,11 @@
if (thread_sp->GetIndexID() != thread_index_array[idx])
{
lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP | LIBLLDB_LOG_PROCESS));
- log->Printf("The thread at position %d changed from %d to %d while processing event.",
- idx,
- thread_index_array[idx],
- thread_sp->GetIndexID());
+ if (log)
+ log->Printf("The thread at position %d changed from %d to %d while processing event.",
+ idx,
+ thread_index_array[idx],
+ thread_sp->GetIndexID());
break;
}
More information about the lldb-commits
mailing list