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 "DAPForward.h"
14#include "Protocol/ProtocolTypes.h"
15#include "lldb/API/SBError.h"
16#include "lldb/API/SBWatchpoint.h"
17#include "lldb/API/SBWatchpointOptions.h"
18#include "lldb/lldb-types.h"
19#include <cstddef>
20
21namespace lldb_dap {
22
23class Watchpoint : public BreakpointBase {
24public:
25 Watchpoint(DAP &d, const protocol::DataBreakpoint &breakpoint);
26 Watchpoint(DAP &d, lldb::SBWatchpoint wp) : BreakpointBase(d), m_wp(wp) {}
27
28 void SetCondition() override;
29 void SetHitCondition() override;
30
31 protocol::Breakpoint ToProtocolBreakpoint() override;
32
33 void SetWatchpoint();
34
35 lldb::addr_t GetAddress() const { return m_addr; }
36
37protected:
38 lldb::addr_t m_addr;
39 size_t m_size;
40 lldb::SBWatchpointOptions m_options;
41 /// The LLDB breakpoint associated wit this watchpoint.
42 lldb::SBWatchpoint m_wp;
43 lldb::SBError m_error;
44};
45} // namespace lldb_dap
46
47#endif
48

Provided by KDAB

Privacy Policy
Learn to use CMake with our Intro Training
Find out more

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