LLDB
mainline
llvm-project
lldb
include
lldb
Interpreter
Interfaces
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
"
13
#include "
lldb/Symbol/SymbolContext.h
"
14
#include "
lldb/Target/Target.h
"
15
#include "
lldb/lldb-private.h
"
16
17
namespace
lldb_private
{
18
class
ScriptedBreakpointInterface
:
public
ScriptedInterface
{
19
public
:
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
; }
28
virtual
lldb::SearchDepth
GetDepth
() {
return
lldb::eSearchDepthModule
; }
29
virtual
std::optional<std::string>
GetShortHelp
() {
return
nullptr
; }
30
/// WasHit returns the breakpoint location SP for the location that was "hit".
31
virtual
lldb::BreakpointLocationSP
32
WasHit
(
lldb::StackFrameSP
frame_sp,
lldb::BreakpointLocationSP
bp_loc_sp) {
33
return
LLDB_INVALID_BREAK_ID
;
34
}
35
virtual
std::optional<std::string>
36
GetLocationDescription
(
lldb::BreakpointLocationSP
bp_loc_sp,
37
lldb::DescriptionLevel
level) {
38
return
{};
39
}
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
ScriptedInterface.h
SymbolContext.h
Target.h
lldb_private::ScriptedBreakpointInterface
Definition
ScriptedBreakpointInterface.h:18
lldb_private::ScriptedBreakpointInterface::SetBreakpoint
virtual void SetBreakpoint(lldb::BreakpointSP break_sp)
Definition
ScriptedBreakpointInterface.h:41
lldb_private::ScriptedBreakpointInterface::GetLocationDescription
virtual std::optional< std::string > GetLocationDescription(lldb::BreakpointLocationSP bp_loc_sp, lldb::DescriptionLevel level)
Definition
ScriptedBreakpointInterface.h:36
lldb_private::ScriptedBreakpointInterface::WasHit
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".
Definition
ScriptedBreakpointInterface.h:32
lldb_private::ScriptedBreakpointInterface::CreatePluginObject
virtual llvm::Expected< StructuredData::GenericSP > CreatePluginObject(const ScriptedMetadata &scripted_metadata, lldb::BreakpointSP break_sp)=0
lldb_private::ScriptedBreakpointInterface::ResolverCallback
virtual bool ResolverCallback(SymbolContext sym_ctx)
"ResolverCallback" will get called when a new module is loaded.
Definition
ScriptedBreakpointInterface.h:27
lldb_private::ScriptedBreakpointInterface::GetDepth
virtual lldb::SearchDepth GetDepth()
Definition
ScriptedBreakpointInterface.h:28
lldb_private::ScriptedBreakpointInterface::OverridesResolver
virtual bool OverridesResolver(Target &target, StructuredDataImpl &original_resolver)
Definition
ScriptedBreakpointInterface.h:43
lldb_private::ScriptedBreakpointInterface::GetShortHelp
virtual std::optional< std::string > GetShortHelp()
Definition
ScriptedBreakpointInterface.h:29
lldb_private::ScriptedInterface::ScriptedInterface
ScriptedInterface()=default
lldb_private::ScriptedMetadata
Definition
ScriptedMetadata.h:18
lldb_private::StructuredDataImpl
Definition
StructuredDataImpl.h:26
lldb_private::SymbolContext
Defines a symbol context baton that can be handed other debug core functions.
Definition
SymbolContext.h:37
lldb_private::Target
Definition
Target.h:580
LLDB_INVALID_BREAK_ID
#define LLDB_INVALID_BREAK_ID
Definition
lldb-defines.h:37
lldb-private.h
lldb_private
A class that represents a running process on the host machine.
Definition
SBAddressRange.h:14
lldb::StackFrameSP
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
Definition
lldb-forward.h:443
lldb::BreakpointLocationSP
std::shared_ptr< lldb_private::BreakpointLocation > BreakpointLocationSP
Definition
lldb-forward.h:331
lldb::DescriptionLevel
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
Definition
lldb-enumerations.h:221
lldb::BreakpointSP
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP
Definition
lldb-forward.h:328
lldb::SearchDepth
SearchDepth
Definition
lldb-enumerations.h:301
lldb::eSearchDepthModule
@ eSearchDepthModule
Definition
lldb-enumerations.h:304
Generated on
for LLDB by
1.14.0