summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2011-06-15 21:16:00 +0000
committerJim Ingham <jingham@apple.com>2011-06-15 21:16:00 +0000
commit691bcc2a62dc73320411a6d97e0591e6074e979a (patch)
tree83b79bb01af297d66bf701b8bada98de35999861
parentdcb562dea4e71c6e16354b0b82d1cff5f930ddc8 (diff)
downloadbcm5719-llvm-691bcc2a62dc73320411a6d97e0591e6074e979a.tar.gz
bcm5719-llvm-691bcc2a62dc73320411a6d97e0591e6074e979a.zip
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. llvm-svn: 133088
-rw-r--r--lldb/include/lldb/Breakpoint/Breakpoint.h2
-rw-r--r--lldb/include/lldb/Breakpoint/BreakpointLocation.h2
-rw-r--r--lldb/include/lldb/Breakpoint/BreakpointOptions.h2
-rw-r--r--lldb/source/Breakpoint/Breakpoint.cpp2
-rw-r--r--lldb/source/Breakpoint/BreakpointLocation.cpp6
-rw-r--r--lldb/source/Breakpoint/BreakpointOptions.cpp4
6 files changed, 9 insertions, 9 deletions
diff --git a/lldb/include/lldb/Breakpoint/Breakpoint.h b/lldb/include/lldb/Breakpoint/Breakpoint.h
index adb10fa2846..10d2f1b43a6 100644
--- a/lldb/include/lldb/Breakpoint/Breakpoint.h
+++ b/lldb/include/lldb/Breakpoint/Breakpoint.h
@@ -404,7 +404,7 @@ public:
/// 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.
diff --git a/lldb/include/lldb/Breakpoint/BreakpointLocation.h b/lldb/include/lldb/Breakpoint/BreakpointLocation.h
index b4d9f927808..3aa98a32d44 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointLocation.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointLocation.h
@@ -190,7 +190,7 @@ public:
// condition has been set.
//------------------------------------------------------------------
const char *
- GetConditionText ();
+ GetConditionText () const;
//------------------------------------------------------------------
diff --git a/lldb/include/lldb/Breakpoint/BreakpointOptions.h b/lldb/include/lldb/Breakpoint/BreakpointOptions.h
index e7c1ec884b8..d007685726d 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointOptions.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointOptions.h
@@ -126,7 +126,7 @@ public:
/// 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
diff --git a/lldb/source/Breakpoint/Breakpoint.cpp b/lldb/source/Breakpoint/Breakpoint.cpp
index acc1a122911..4fa77dd7135 100644
--- a/lldb/source/Breakpoint/Breakpoint.cpp
+++ b/lldb/source/Breakpoint/Breakpoint.cpp
@@ -201,7 +201,7 @@ Breakpoint::GetThreadPlanToTestCondition (ExecutionContext &exe_ctx, lldb::Break
}
const char *
-Breakpoint::GetConditionText ()
+Breakpoint::GetConditionText () const
{
return m_options.GetConditionText();
}
diff --git a/lldb/source/Breakpoint/BreakpointLocation.cpp b/lldb/source/Breakpoint/BreakpointLocation.cpp
index 311555cdc39..f068c72a924 100644
--- a/lldb/source/Breakpoint/BreakpointLocation.cpp
+++ b/lldb/source/Breakpoint/BreakpointLocation.cpp
@@ -157,9 +157,9 @@ BreakpointLocation::GetThreadPlanToTestCondition (ExecutionContext &exe_ctx, Str
}
const char *
-BreakpointLocation::GetConditionText ()
+BreakpointLocation::GetConditionText () const
{
- return GetLocationOptions()->GetConditionText();
+ return GetOptionsNoCreate()->GetConditionText();
}
uint32_t
@@ -226,7 +226,7 @@ BreakpointLocation::ShouldStop (StoppointCallbackContext *context)
// 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.
diff --git a/lldb/source/Breakpoint/BreakpointOptions.cpp b/lldb/source/Breakpoint/BreakpointOptions.cpp
index eb7c2c48548..d6238869030 100644
--- a/lldb/source/Breakpoint/BreakpointOptions.cpp
+++ b/lldb/source/Breakpoint/BreakpointOptions.cpp
@@ -217,12 +217,12 @@ BreakpointOptions::GetThreadPlanToTestCondition (ExecutionContext &exe_ctx,
}
const char *
-BreakpointOptions::GetConditionText ()
+BreakpointOptions::GetConditionText () const
{
if (m_condition_ap.get())
return m_condition_ap->GetUserText();
else
- return "<No Condition>";
+ return NULL;
}
//------------------------------------------------------------------
OpenPOWER on IntegriCloud