1 //===-- BreakpointBase.h ----------------------------------------*- C++ -*-===//
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
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"
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