summaryrefslogtreecommitdiffstats
path: root/lldb/source/Breakpoint
diff options
context:
space:
mode:
authorAlex Langford <apl@fb.com>2019-06-21 19:43:07 +0000
committerAlex Langford <apl@fb.com>2019-06-21 19:43:07 +0000
commit7f9c9f2264235f94b5496281cadcc4a9775dbd8f (patch)
treef3818af590c4ba9fa489cd7608295d057673e250 /lldb/source/Breakpoint
parent4649a051bf0b80732ebe805c65a40756e883df6a (diff)
downloadbcm5719-llvm-7f9c9f2264235f94b5496281cadcc4a9775dbd8f.tar.gz
bcm5719-llvm-7f9c9f2264235f94b5496281cadcc4a9775dbd8f.zip
[Target] Decouple ObjCLanguageRuntime from LanguageRuntime
Summary: ObjCLanguageRuntime was being pulled into LanguageRuntime because of Breakpoint Preconditions. If we move BreakpointPrecondition out of Breakpoint, we can extend the LanguageRuntime plugin interface so that LanguageRuntimes can give us a BreakpointPrecondition for exceptions. Differential Revision: https://reviews.llvm.org/D63181 llvm-svn: 364098
Diffstat (limited to 'lldb/source/Breakpoint')
-rw-r--r--lldb/source/Breakpoint/Breakpoint.cpp16
-rw-r--r--lldb/source/Breakpoint/BreakpointPrecondition.cpp26
-rw-r--r--lldb/source/Breakpoint/CMakeLists.txt1
3 files changed, 28 insertions, 15 deletions
diff --git a/lldb/source/Breakpoint/Breakpoint.cpp b/lldb/source/Breakpoint/Breakpoint.cpp
index 0ebba5937fa..3c3841949b9 100644
--- a/lldb/source/Breakpoint/Breakpoint.cpp
+++ b/lldb/source/Breakpoint/Breakpoint.cpp
@@ -11,6 +11,7 @@
#include "lldb/Breakpoint/Breakpoint.h"
#include "lldb/Breakpoint/BreakpointLocation.h"
#include "lldb/Breakpoint/BreakpointLocationCollection.h"
+#include "lldb/Breakpoint/BreakpointPrecondition.h"
#include "lldb/Breakpoint/BreakpointResolver.h"
#include "lldb/Breakpoint/BreakpointResolverFileLine.h"
#include "lldb/Core/Address.h"
@@ -995,21 +996,6 @@ bool Breakpoint::EvaluatePrecondition(StoppointCallbackContext &context) {
return m_precondition_sp->EvaluatePrecondition(context);
}
-bool Breakpoint::BreakpointPrecondition::EvaluatePrecondition(
- StoppointCallbackContext &context) {
- return true;
-}
-
-void Breakpoint::BreakpointPrecondition::GetDescription(
- Stream &stream, lldb::DescriptionLevel level) {}
-
-Status
-Breakpoint::BreakpointPrecondition::ConfigurePrecondition(Args &options) {
- Status error;
- error.SetErrorString("Base breakpoint precondition has no options.");
- return error;
-}
-
void Breakpoint::SendBreakpointChangedEvent(
lldb::BreakpointEventType eventKind) {
if (!m_being_created && !IsInternal() &&
diff --git a/lldb/source/Breakpoint/BreakpointPrecondition.cpp b/lldb/source/Breakpoint/BreakpointPrecondition.cpp
new file mode 100644
index 00000000000..a387c75c835
--- /dev/null
+++ b/lldb/source/Breakpoint/BreakpointPrecondition.cpp
@@ -0,0 +1,26 @@
+//===-- BreakpointPrecondition.cpp ------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Breakpoint/BreakpointPrecondition.h"
+#include "lldb/Utility/Status.h"
+
+using namespace lldb_private;
+
+bool BreakpointPrecondition::EvaluatePrecondition(
+ StoppointCallbackContext &context) {
+ return false;
+}
+
+void BreakpointPrecondition::GetDescription(Stream &stream,
+ lldb::DescriptionLevel level) {}
+
+Status BreakpointPrecondition::ConfigurePrecondition(Args &args) {
+ Status error;
+ error.SetErrorString("Base breakpoint precondition has no options.");
+ return error;
+}
diff --git a/lldb/source/Breakpoint/CMakeLists.txt b/lldb/source/Breakpoint/CMakeLists.txt
index 439946ca92c..a7c0baf21af 100644
--- a/lldb/source/Breakpoint/CMakeLists.txt
+++ b/lldb/source/Breakpoint/CMakeLists.txt
@@ -8,6 +8,7 @@ add_lldb_library(lldbBreakpoint
BreakpointLocationList.cpp
BreakpointName.cpp
BreakpointOptions.cpp
+ BreakpointPrecondition.cpp
BreakpointResolver.cpp
BreakpointResolverAddress.cpp
BreakpointResolverFileLine.cpp
OpenPOWER on IntegriCloud