1 | //===-- InstructionBreakpoint.h --------------------------------------*- C++ |
2 | //-*-===// |
3 | // |
4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
5 | // See https://llvm.org/LICENSE.txt for license information. |
6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
7 | // |
8 | //===----------------------------------------------------------------------===// |
9 | |
10 | #ifndef LLDB_TOOLS_LLDB_DAP_INSTRUCTIONBREAKPOINT_H |
11 | #define LLDB_TOOLS_LLDB_DAP_INSTRUCTIONBREAKPOINT_H |
12 | |
13 | #include "Breakpoint.h" |
14 | #include "DAPForward.h" |
15 | #include "Protocol/ProtocolTypes.h" |
16 | #include "lldb/lldb-types.h" |
17 | #include <cstdint> |
18 | |
19 | namespace lldb_dap { |
20 | |
21 | /// Instruction Breakpoint |
22 | class InstructionBreakpoint : public Breakpoint { |
23 | public: |
24 | InstructionBreakpoint(DAP &d, |
25 | const protocol::InstructionBreakpoint &breakpoint); |
26 | |
27 | /// Set instruction breakpoint in LLDB as a new breakpoint. |
28 | void SetBreakpoint(); |
29 | |
30 | lldb::addr_t GetInstructionAddressReference() const { |
31 | return m_instruction_address_reference; |
32 | } |
33 | |
34 | protected: |
35 | lldb::addr_t m_instruction_address_reference; |
36 | int32_t m_offset; |
37 | }; |
38 | |
39 | } // namespace lldb_dap |
40 | |
41 | #endif |
42 | |