Coverage Report

Created: 2022-01-22 13:19

/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/tools/lldb-vscode/FunctionBreakpoint.cpp
Line
Count
Source (jump to first uncovered line)
1
//===-- FunctionBreakpoint.cpp ----------------------------------*- 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
#include "FunctionBreakpoint.h"
10
#include "VSCode.h"
11
12
namespace lldb_vscode {
13
14
FunctionBreakpoint::FunctionBreakpoint(const llvm::json::Object &obj)
15
0
    : BreakpointBase(obj), functionName(std::string(GetString(obj, "name"))) {}
16
17
0
void FunctionBreakpoint::SetBreakpoint() {
18
0
  if (functionName.empty())
19
0
    return;
20
0
  bp = g_vsc.target.BreakpointCreateByName(functionName.c_str());
21
  // See comments in BreakpointBase::GetBreakpointLabel() for details of why
22
  // we add a label to our breakpoints.
23
0
  bp.AddName(GetBreakpointLabel());
24
0
  if (!condition.empty())
25
0
    SetCondition();
26
0
  if (!hitCondition.empty())
27
0
    SetHitCondition();
28
0
}
29
30
} // namespace lldb_vscode