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

Johnny Chen johnny.chen at apple.com
Mon Jan 30 13:16:22 PST 2012


Author: johnny
Date: Mon Jan 30 15:16:22 2012
New Revision: 149277

URL: http://llvm.org/viewvc/llvm-project?rev=149277&view=rev
Log:
Make BreakpointLocation::IsEnabled() consistent with the BreakpointLocation::SetEnabled() implementation.

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=149277&r1=149276&r2=149277&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h Mon Jan 30 15:16:22 2012
@@ -111,7 +111,7 @@
     ///     \b true if the breakpoint is enabled, \b false if disabled.
     //------------------------------------------------------------------
     bool
-    IsEnabled ();
+    IsEnabled () const;
 
     //------------------------------------------------------------------
     /// 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=149277&r1=149276&r2=149277&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointLocation.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointLocation.cpp Mon Jan 30 15:16:22 2012
@@ -70,14 +70,12 @@
 }
 
 bool
-BreakpointLocation::IsEnabled ()
+BreakpointLocation::IsEnabled () const
 {
-    if (!m_owner.IsEnabled())
-        return false;
-    else if (m_options_ap.get() != NULL)
+    if (m_options_ap.get() != NULL)
         return m_options_ap->IsEnabled();
     else
-        return true;
+        return m_owner.IsEnabled();
 }
 
 void
@@ -414,7 +412,7 @@
               GetID(),
               GetOptionsNoCreate()->GetThreadSpecNoCreate()->GetTID(),
               (uint64_t) m_address.GetOpcodeLoadAddress (&m_owner.GetTarget()),
-              (m_options_ap.get() ? m_options_ap->IsEnabled() : m_owner.IsEnabled()) ? "enabled " : "disabled",
+              IsEnabled() ? "enabled " : "disabled",
               IsHardware() ? "hardware" : "software",
               GetHardwareIndex(),
               GetHitCount(),





More information about the lldb-commits mailing list