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//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H
10#define LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H
11
12#include "lldb/API/SBBreakpoint.h"
13#include "llvm/Support/JSON.h"
14#include <string>
15#include <vector>
16
17namespace lldb_dap {
18
19struct BreakpointBase {
20
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;
26
27 BreakpointBase() = default;
28 BreakpointBase(const llvm::json::Object &obj);
29 virtual ~BreakpointBase() = default;
30
31 virtual void SetCondition() = 0;
32 virtual void SetHitCondition() = 0;
33 virtual void CreateJsonObject(llvm::json::Object &object) = 0;
34
35 void UpdateBreakpoint(const BreakpointBase &request_bp);
36
37 static const char *GetBreakpointLabel();
38};
39
40} // namespace lldb_dap
41
42#endif
43

source code of lldb/tools/lldb-dap/BreakpointBase.h