[Lldb-commits] [lldb] r173308 - /lldb/trunk/source/Breakpoint/Breakpoint.cpp

Jim Ingham jingham at apple.com
Wed Jan 23 15:14:13 PST 2013


Author: jingham
Date: Wed Jan 23 17:14:13 2013
New Revision: 173308

URL: http://llvm.org/viewvc/llvm-project?rev=173308&view=rev
Log:
Check for NULL breakpoint option thread name & queue name before comparing their values to the new value.

<rdar://problem/13065198>

Modified:
    lldb/trunk/source/Breakpoint/Breakpoint.cpp

Modified: lldb/trunk/source/Breakpoint/Breakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Breakpoint.cpp?rev=173308&r1=173307&r2=173308&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/Breakpoint.cpp (original)
+++ lldb/trunk/source/Breakpoint/Breakpoint.cpp Wed Jan 23 17:14:13 2013
@@ -242,7 +242,8 @@
 void
 Breakpoint::SetThreadName (const char *thread_name)
 {
-    if (::strcmp (m_options.GetThreadSpec()->GetName(), thread_name) == 0)
+    if (m_options.GetThreadSpec()->GetName() != NULL
+        && ::strcmp (m_options.GetThreadSpec()->GetName(), thread_name) == 0)
         return;
         
     m_options.GetThreadSpec()->SetName (thread_name);
@@ -261,7 +262,8 @@
 void 
 Breakpoint::SetQueueName (const char *queue_name)
 {
-    if (::strcmp (m_options.GetThreadSpec()->GetQueueName(), queue_name) == 0)
+    if (m_options.GetThreadSpec()->GetQueueName() != NULL
+        && ::strcmp (m_options.GetThreadSpec()->GetQueueName(), queue_name) == 0)
         return;
         
     m_options.GetThreadSpec()->SetQueueName (queue_name);





More information about the lldb-commits mailing list