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/lldb-private.h"
15
16namespace lldb_private {
18public:
19 virtual llvm::Expected<StructuredData::GenericSP>
20 CreatePluginObject(llvm::StringRef class_name, lldb::BreakpointSP break_sp,
21 const StructuredDataImpl &args_sp) = 0;
22
23 /// "ResolverCallback" will get called when a new module is loaded. The
24 /// new module information is passed in sym_ctx. The Resolver will add
25 /// any breakpoint locations it found in that module.
26 virtual bool ResolverCallback(SymbolContext sym_ctx) { return true; }
28 virtual std::optional<std::string> GetShortHelp() { return nullptr; }
29 /// WasHit returns the breakpoint location SP for the location that was "hit".
34 virtual std::optional<std::string>
39};
40} // namespace lldb_private
41
42#endif // LLDB_INTERPRETER_INTERFACES_SCRIPTEDSTOPHOOKINTERFACE_H
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 bool ResolverCallback(SymbolContext sym_ctx)
"ResolverCallback" will get called when a new module is loaded.
virtual llvm::Expected< StructuredData::GenericSP > CreatePluginObject(llvm::StringRef class_name, lldb::BreakpointSP break_sp, const StructuredDataImpl &args_sp)=0
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