Bump version to 19.1.0 (final)
[llvm-project.git] / lldb / tools / lldb-dap / BreakpointBase.h
blob5a04bb201615fc86100f1eda0b73b8f806b599da
1 //===-- BreakpointBase.h ----------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H
10 #define LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H
12 #include "lldb/API/SBBreakpoint.h"
13 #include "llvm/Support/JSON.h"
14 #include <string>
15 #include <vector>
17 namespace lldb_dap {
19 struct BreakpointBase {
21 // An optional expression for conditional breakpoints.
22 std::string condition;
23 // An optional expression that controls how many hits of the breakpoint are
24 // ignored. The backend is expected to interpret the expression as needed
25 std::string hitCondition;
27 BreakpointBase() = default;
28 BreakpointBase(const llvm::json::Object &obj);
29 virtual ~BreakpointBase() = default;
31 virtual void SetCondition() = 0;
32 virtual void SetHitCondition() = 0;
33 virtual void CreateJsonObject(llvm::json::Object &object) = 0;
35 void UpdateBreakpoint(const BreakpointBase &request_bp);
37 static const char *GetBreakpointLabel();
40 } // namespace lldb_dap
42 #endif