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//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_TOOLS_LLDB_DAP_WATCHPOINT_H
10#define LLDB_TOOLS_LLDB_DAP_WATCHPOINT_H
11
12#include "BreakpointBase.h"
13#include "lldb/API/SBError.h"
14#include "lldb/API/SBWatchpoint.h"
15#include "lldb/API/SBWatchpointOptions.h"
16
17namespace lldb_dap {
18
19struct Watchpoint : public BreakpointBase {
20 lldb::addr_t addr;
21 size_t size;
22 lldb::SBWatchpointOptions options;
23 // The LLDB breakpoint associated wit this watchpoint.
24 lldb::SBWatchpoint wp;
25 lldb::SBError error;
26
27 Watchpoint() = default;
28 Watchpoint(const llvm::json::Object &obj);
29 Watchpoint(lldb::SBWatchpoint wp) : wp(wp) {}
30
31 void SetCondition() override;
32 void SetHitCondition() override;
33 void CreateJsonObject(llvm::json::Object &object) override;
34
35 void SetWatchpoint();
36};
37} // namespace lldb_dap
38
39#endif
40

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