[sanitizer] Improve FreeBSD ASLR detection
[llvm-project.git] / lldb / tools / lldb-vscode / BreakpointBase.h
blobeb1e466e2444a6de77cf1b7ef116c6e8ed0bc34b
1 //===-- BreakpointBase.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 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_TOOLS_LLDB_VSCODE_BREAKPOINTBASE_H
10 #define LLDB_TOOLS_LLDB_VSCODE_BREAKPOINTBASE_H
12 #include "JSONUtils.h"
13 #include "lldb/API/SBBreakpoint.h"
14 #include "llvm/Support/JSON.h"
15 #include <string>
17 namespace lldb_vscode {
19 struct BreakpointBase {
21 // An optional expression for conditional breakpoints.
22 std::string condition;
23 // An optional expression that controls how many hits of the breakpoint are
24 // ignored. The backend is expected to interpret the expression as needed
25 std::string hitCondition;
26 // If this attribute exists and is non-empty, the backend must not 'break'
27 // (stop) but log the message instead. Expressions within {} are
28 // interpolated.
29 std::string logMessage;
30 // The LLDB breakpoint associated wit this source breakpoint
31 lldb::SBBreakpoint bp;
33 BreakpointBase() = default;
34 BreakpointBase(const llvm::json::Object &obj);
36 void SetCondition();
37 void SetHitCondition();
38 void UpdateBreakpoint(const BreakpointBase &request_bp);
39 static const char *GetBreakpointLabel();
42 } // namespace lldb_vscode
44 #endif