aboutsummaryrefslogtreecommitdiff
path: root/lldb/tools/lldb-dap/Watchpoint.h
blob: 026b07d67241cef08752f8f7efa2157d83a07f6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//===-- Watchpoint.h --------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLDB_TOOLS_LLDB_DAP_WATCHPOINT_H
#define LLDB_TOOLS_LLDB_DAP_WATCHPOINT_H

#include "BreakpointBase.h"
#include "lldb/API/SBError.h"
#include "lldb/API/SBWatchpoint.h"
#include "lldb/API/SBWatchpointOptions.h"

namespace lldb_dap {

struct Watchpoint : public BreakpointBase {
  // The LLDB breakpoint associated wit this watchpoint.
  lldb::SBWatchpoint wp;
  lldb::SBError error;

  Watchpoint() = default;
  Watchpoint(const llvm::json::Object &obj);
  Watchpoint(lldb::SBWatchpoint wp) : wp(wp) {}

  void SetCondition() override;
  void SetHitCondition() override;
  void CreateJsonObject(llvm::json::Object &object) override;
};
} // namespace lldb_dap

#endif