diff options
author | Jim Ingham <jingham@apple.com> | 2011-06-15 21:16:00 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-06-15 21:16:00 +0000 |
commit | ac35442b2b1a35ea3100c870214977e3bddb76f6 (patch) | |
tree | ce0623cd8161cb32cd6d01a16817c5eaea5b56f4 /source/Breakpoint | |
parent | 3dfeeec363fbd2baead9ba79ef0cd219b73b4d2f (diff) | |
download | lldb-ac35442b2b1a35ea3100c870214977e3bddb76f6.tar.gz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133088 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Breakpoint')
-rw-r--r-- | source/Breakpoint/Breakpoint.cpp | 2 | ||||
-rw-r--r-- | source/Breakpoint/BreakpointLocation.cpp | 6 | ||||
-rw-r--r-- | source/Breakpoint/BreakpointOptions.cpp | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source/Breakpoint/Breakpoint.cpp b/source/Breakpoint/Breakpoint.cpp index acc1a1229..4fa77dd71 100644 --- a/source/Breakpoint/Breakpoint.cpp +++ b/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/source/Breakpoint/BreakpointLocation.cpp b/source/Breakpoint/BreakpointLocation.cpp index 311555cdc..f068c72a9 100644 --- a/source/Breakpoint/BreakpointLocation.cpp +++ b/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/source/Breakpoint/BreakpointOptions.cpp b/source/Breakpoint/BreakpointOptions.cpp index eb7c2c485..d62388690 100644 --- a/source/Breakpoint/BreakpointOptions.cpp +++ b/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; } //------------------------------------------------------------------ |