[NFC][Coroutines] Use structured binding with llvm::enumerate in CoroSplit (#116879)
[llvm-project.git] / lldb / tools / lldb-dap / Watchpoint.h
blob77cea67bb9781081116ef8d67260cc95b4d7f33e
1 //===-- Watchpoint.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_WATCHPOINT_H
10 #define LLDB_TOOLS_LLDB_DAP_WATCHPOINT_H
12 #include "BreakpointBase.h"
13 #include "DAPForward.h"
14 #include "lldb/API/SBError.h"
15 #include "lldb/API/SBWatchpoint.h"
16 #include "lldb/API/SBWatchpointOptions.h"
17 #include "lldb/lldb-types.h"
18 #include <cstddef>
20 namespace lldb_dap {
22 struct Watchpoint : public BreakpointBase {
23 lldb::addr_t addr;
24 size_t size;
25 lldb::SBWatchpointOptions options;
26 // The LLDB breakpoint associated wit this watchpoint.
27 lldb::SBWatchpoint wp;
28 lldb::SBError error;
30 Watchpoint(DAP &d, const llvm::json::Object &obj);
31 Watchpoint(DAP &d, lldb::SBWatchpoint wp) : BreakpointBase(d), wp(wp) {}
33 void SetCondition() override;
34 void SetHitCondition() override;
35 void CreateJsonObject(llvm::json::Object &object) override;
37 void SetWatchpoint();
39 } // namespace lldb_dap
41 #endif