1 //===-- Breakpoint.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_BREAKPOINT_H 10 #define LLDB_TOOLS_LLDB_DAP_BREAKPOINT_H 11 12 #include "BreakpointBase.h" 13 #include "DAPForward.h" 14 #include "lldb/API/SBBreakpoint.h" 15 16 namespace lldb_dap { 17 18 struct Breakpoint : public BreakpointBase { 19 // The LLDB breakpoint associated wit this source breakpoint 20 lldb::SBBreakpoint bp; 21 22 Breakpoint(DAP &d, const llvm::json::Object &obj) : BreakpointBase(d, obj) {} 23 Breakpoint(DAP &d, lldb::SBBreakpoint bp) : BreakpointBase(d), bp(bp) {} 24 25 void SetCondition() override; 26 void SetHitCondition() override; 27 void CreateJsonObject(llvm::json::Object &object) override; 28 29 bool MatchesName(const char *name); 30 void SetBreakpoint(); 31 }; 32 } // namespace lldb_dap 33 34 #endif 35