[Lldb-commits] [lldb] r133088 - in /lldb/trunk: include/lldb/Breakpoint/Breakpoint.h include/lldb/Breakpoint/BreakpointLocation.h include/lldb/Breakpoint/BreakpointOptions.h source/Breakpoint/Breakpoint.cpp source/Breakpoint/BreakpointLocation.cpp source/Breakpoint/BreakpointOptions.cpp
Jim Ingham
jingham at apple.com
Wed Jun 15 14:16:00 PDT 2011
Author: jingham
Date: Wed Jun 15 16:16:00 2011
New Revision: 133088
URL: http://llvm.org/viewvc/llvm-project?rev=133088&view=rev
Log:
Made GetConditionText const everywhere. Made it return NULL when there's no condition
like the doc's say it should. Make sure we have a condition before we set up a test whether
we have one, so we only present a "could not parse condition" error if we actually have a condition.
Modified:
lldb/trunk/include/lldb/Breakpoint/Breakpoint.h
lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h
lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h
lldb/trunk/source/Breakpoint/Breakpoint.cpp
lldb/trunk/source/Breakpoint/BreakpointLocation.cpp
lldb/trunk/source/Breakpoint/BreakpointOptions.cpp
Modified: lldb/trunk/include/lldb/Breakpoint/Breakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/Breakpoint.h?rev=133088&r1=133087&r2=133088&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/Breakpoint.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/Breakpoint.h Wed Jun 15 16:16:00 2011
@@ -404,7 +404,7 @@
/// A pointer to the condition expression text, or NULL if no
// condition has been set.
//------------------------------------------------------------------
- const char *GetConditionText ();
+ const char *GetConditionText () const;
//------------------------------------------------------------------
// The next section are various utility functions.
Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h?rev=133088&r1=133087&r2=133088&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h Wed Jun 15 16:16:00 2011
@@ -190,7 +190,7 @@
// condition has been set.
//------------------------------------------------------------------
const char *
- GetConditionText ();
+ GetConditionText () const;
//------------------------------------------------------------------
Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h?rev=133088&r1=133087&r2=133088&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h Wed Jun 15 16:16:00 2011
@@ -126,7 +126,7 @@
/// A pointer to the condition expression text, or NULL if no
// condition has been set.
//------------------------------------------------------------------
- const char *GetConditionText ();
+ const char *GetConditionText () const;
//------------------------------------------------------------------
// Enabled/Ignore Count
Modified: lldb/trunk/source/Breakpoint/Breakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Breakpoint.cpp?rev=133088&r1=133087&r2=133088&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/Breakpoint.cpp (original)
+++ lldb/trunk/source/Breakpoint/Breakpoint.cpp Wed Jun 15 16:16:00 2011
@@ -201,7 +201,7 @@
}
const char *
-Breakpoint::GetConditionText ()
+Breakpoint::GetConditionText () const
{
return m_options.GetConditionText();
}
Modified: lldb/trunk/source/Breakpoint/BreakpointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointLocation.cpp?rev=133088&r1=133087&r2=133088&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointLocation.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointLocation.cpp Wed Jun 15 16:16:00 2011
@@ -157,9 +157,9 @@
}
const char *
-BreakpointLocation::GetConditionText ()
+BreakpointLocation::GetConditionText () const
{
- return GetLocationOptions()->GetConditionText();
+ return GetOptionsNoCreate()->GetConditionText();
}
uint32_t
@@ -226,7 +226,7 @@
// The SYNCHRONOUS callback says we should stop, next try the condition.
- if (should_stop)
+ if (should_stop && GetConditionText() != NULL)
{
// We need to make sure the user sees any parse errors in their condition, so we'll hook the
// constructor errors up to the debugger's Async I/O.
Modified: lldb/trunk/source/Breakpoint/BreakpointOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointOptions.cpp?rev=133088&r1=133087&r2=133088&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointOptions.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointOptions.cpp Wed Jun 15 16:16:00 2011
@@ -217,12 +217,12 @@
}
const char *
-BreakpointOptions::GetConditionText ()
+BreakpointOptions::GetConditionText () const
{
if (m_condition_ap.get())
return m_condition_ap->GetUserText();
else
- return "<No Condition>";
+ return NULL;
}
//------------------------------------------------------------------
More information about the lldb-commits
mailing list