[Lldb-commits] [lldb] r149292 - in /lldb/trunk: include/lldb/Breakpoint/BreakpointLocation.h source/Breakpoint/BreakpointLocation.cpp

Johnny Chen johnny.chen at apple.com
Mon Jan 30 14:48:11 PST 2012


Author: johnny
Date: Mon Jan 30 16:48:10 2012
New Revision: 149292

URL: http://llvm.org/viewvc/llvm-project?rev=149292&view=rev
Log:
Reverted 149277 changeset.  It was coded that way for a reason.

Modified:
    lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h
    lldb/trunk/source/Breakpoint/BreakpointLocation.cpp

Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h?rev=149292&r1=149291&r2=149292&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h Mon Jan 30 16:48:10 2012
@@ -111,7 +111,7 @@
     ///     \b true if the breakpoint is enabled, \b false if disabled.
     //------------------------------------------------------------------
     bool
-    IsEnabled () const;
+    IsEnabled ();
 
     //------------------------------------------------------------------
     /// Return the current Ignore Count.

Modified: lldb/trunk/source/Breakpoint/BreakpointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointLocation.cpp?rev=149292&r1=149291&r2=149292&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointLocation.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointLocation.cpp Mon Jan 30 16:48:10 2012
@@ -70,12 +70,14 @@
 }
 
 bool
-BreakpointLocation::IsEnabled () const
+BreakpointLocation::IsEnabled ()
 {
-    if (m_options_ap.get() != NULL)
+    if (!m_owner.IsEnabled())
+        return false;
+    else if (m_options_ap.get() != NULL)
         return m_options_ap->IsEnabled();
     else
-        return m_owner.IsEnabled();
+        return true;
 }
 
 void
@@ -412,7 +414,7 @@
               GetID(),
               GetOptionsNoCreate()->GetThreadSpecNoCreate()->GetTID(),
               (uint64_t) m_address.GetOpcodeLoadAddress (&m_owner.GetTarget()),
-              IsEnabled() ? "enabled " : "disabled",
+              (m_options_ap.get() ? m_options_ap->IsEnabled() : m_owner.IsEnabled()) ? "enabled " : "disabled",
               IsHardware() ? "hardware" : "software",
               GetHardwareIndex(),
               GetHitCount(),





More information about the lldb-commits mailing list