LLDB mainline
ScriptedBreakpointInterface.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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_INTERPRETER_INTERFACES_SCRIPTEDBREAKPOINTINTERFACE_H
10#define LLDB_INTERPRETER_INTERFACES_SCRIPTEDBREAKPOINTINTERFACE_H
11
12#include "ScriptedInterface.h"
14#include "lldb/Target/Target.h"
15#include "lldb/lldb-private.h"
16
17namespace lldb_private {
19public:
20 virtual llvm::Expected<StructuredData::GenericSP>
21 CreatePluginObject(const ScriptedMetadata &scripted_metadata,
22 lldb::BreakpointSP break_sp) = 0;
23
24 /// "ResolverCallback" will get called when a new module is loaded. The
25 /// new module information is passed in sym_ctx. The Resolver will add
26 /// any breakpoint locations it found in that module.
27 virtual bool ResolverCallback(SymbolContext sym_ctx) { return true; }
29 virtual std::optional<std::string> GetShortHelp() { return nullptr; }
30 /// WasHit returns the breakpoint location SP for the location that was "hit".
35 virtual std::optional<std::string>
40
41 virtual void SetBreakpoint(lldb::BreakpointSP break_sp) {}
42
43 virtual bool OverridesResolver(Target &target,
44 StructuredDataImpl &original_resolver) {
45 return false;
46 }
47};
48} // namespace lldb_private
49
50#endif // LLDB_INTERPRETER_INTERFACES_SCRIPTEDBREAKPOINTINTERFACE_H
virtual void SetBreakpoint(lldb::BreakpointSP break_sp)
virtual std::optional< std::string > GetLocationDescription(lldb::BreakpointLocationSP bp_loc_sp, lldb::DescriptionLevel level)
virtual lldb::BreakpointLocationSP WasHit(lldb::StackFrameSP frame_sp, lldb::BreakpointLocationSP bp_loc_sp)
WasHit returns the breakpoint location SP for the location that was "hit".
virtual llvm::Expected< StructuredData::GenericSP > CreatePluginObject(const ScriptedMetadata &scripted_metadata, lldb::BreakpointSP break_sp)=0
virtual bool ResolverCallback(SymbolContext sym_ctx)
"ResolverCallback" will get called when a new module is loaded.
virtual bool OverridesResolver(Target &target, StructuredDataImpl &original_resolver)
virtual std::optional< std::string > GetShortHelp()
Defines a symbol context baton that can be handed other debug core functions.
#define LLDB_INVALID_BREAK_ID
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::BreakpointLocation > BreakpointLocationSP
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP