diff options
author | Johnny Chen <johnny.chen@apple.com> | 2012-01-30 21:16:22 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2012-01-30 21:16:22 +0000 |
commit | a5822c0501456dc9de98c062469d2e3a5ce83d26 (patch) | |
tree | f2b33052dcc51a3b14e3506fe15aec3fe0b2ead3 | |
parent | 58cc6cabe521c41b18d4592af4047c043e875d2c (diff) | |
download | bcm5719-llvm-a5822c0501456dc9de98c062469d2e3a5ce83d26.tar.gz bcm5719-llvm-a5822c0501456dc9de98c062469d2e3a5ce83d26.zip |
Make BreakpointLocation::IsEnabled() consistent with the BreakpointLocation::SetEnabled() implementation.
llvm-svn: 149277
-rw-r--r-- | lldb/include/lldb/Breakpoint/BreakpointLocation.h | 2 | ||||
-rw-r--r-- | lldb/source/Breakpoint/BreakpointLocation.cpp | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/lldb/include/lldb/Breakpoint/BreakpointLocation.h b/lldb/include/lldb/Breakpoint/BreakpointLocation.h index 71126efde4d..98941cb438b 100644 --- a/lldb/include/lldb/Breakpoint/BreakpointLocation.h +++ b/lldb/include/lldb/Breakpoint/BreakpointLocation.h @@ -111,7 +111,7 @@ public: /// \b true if the breakpoint is enabled, \b false if disabled. //------------------------------------------------------------------ bool - IsEnabled (); + IsEnabled () const; //------------------------------------------------------------------ /// Return the current Ignore Count. diff --git a/lldb/source/Breakpoint/BreakpointLocation.cpp b/lldb/source/Breakpoint/BreakpointLocation.cpp index fb123de56e6..a898c332b16 100644 --- a/lldb/source/Breakpoint/BreakpointLocation.cpp +++ b/lldb/source/Breakpoint/BreakpointLocation.cpp @@ -70,14 +70,12 @@ BreakpointLocation::GetBreakpoint () } 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 @@ BreakpointLocation::Dump(Stream *s) const 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(), |