[mlir][int-range] Limit xor int range inference to i1 (#116968)
[llvm-project.git] / lldb / tools / lldb-dap / InstructionBreakpoint.cpp
blob37daa8f0bdd5f2550972b84b463aa91f782218e2
1 //===-- InstructionBreakpoint.cpp ------------------------------------*- 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 //===----------------------------------------------------------------------===//
10 #include "InstructionBreakpoint.h"
11 #include "DAP.h"
12 #include "JSONUtils.h"
13 #include "lldb/API/SBBreakpoint.h"
14 #include "lldb/API/SBTarget.h"
15 #include "llvm/ADT/StringRef.h"
17 namespace lldb_dap {
19 // Instruction Breakpoint
20 InstructionBreakpoint::InstructionBreakpoint(DAP &d,
21 const llvm::json::Object &obj)
22 : Breakpoint(d, obj), instructionAddressReference(LLDB_INVALID_ADDRESS),
23 offset(GetSigned(obj, "offset", 0)) {
24 GetString(obj, "instructionReference")
25 .getAsInteger(0, instructionAddressReference);
26 instructionAddressReference += offset;
29 void InstructionBreakpoint::SetBreakpoint() {
30 bp = dap.target.BreakpointCreateByAddress(instructionAddressReference);
31 Breakpoint::SetBreakpoint();
34 } // namespace lldb_dap