1 //===-- FunctionBreakpoint.cpp ----------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #include "FunctionBreakpoint.h"
11 #include "JSONUtils.h"
15 FunctionBreakpoint::FunctionBreakpoint(DAP
&d
, const llvm::json::Object
&obj
)
16 : Breakpoint(d
, obj
), functionName(std::string(GetString(obj
, "name"))) {}
18 void FunctionBreakpoint::SetBreakpoint() {
19 if (functionName
.empty())
21 bp
= dap
.target
.BreakpointCreateByName(functionName
.c_str());
22 Breakpoint::SetBreakpoint();
25 } // namespace lldb_dap