Coverage Report

Created: 2023-10-14 09:29

/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/tools/lldb-vscode/SourceBreakpoint.h
Line
Count
Source (jump to first uncovered line)
1
//===-- SourceBreakpoint.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_VSCODE_SOURCEBREAKPOINT_H
10
#define LLDB_TOOLS_LLDB_VSCODE_SOURCEBREAKPOINT_H
11
12
#include "BreakpointBase.h"
13
#include "llvm/ADT/StringRef.h"
14
15
namespace lldb_vscode {
16
17
struct SourceBreakpoint : public BreakpointBase {
18
19
  uint32_t line;   ///< The source line of the breakpoint or logpoint
20
  uint32_t column; ///< An optional source column of the breakpoint
21
22
2
  SourceBreakpoint() : BreakpointBase(), line(0), column(0) {}
23
  SourceBreakpoint(const llvm::json::Object &obj);
24
25
  // Set this breakpoint in LLDB as a new breakpoint
26
  void SetBreakpoint(const llvm::StringRef source_path);
27
};
28
29
inline bool operator<(const SourceBreakpoint &lhs,
30
0
                      const SourceBreakpoint &rhs) {
31
0
  if (lhs.line == rhs.line)
32
0
    return lhs.column < rhs.column;
33
0
  return lhs.line < rhs.line;
34
0
}
35
36
} // namespace lldb_vscode
37
38
#endif