10#ifndef LLDB_TARGET_LANGUAGERUNTIME_H
11#define LLDB_TARGET_LANGUAGERUNTIME_H
32 bool update_module_list =
true);
103 return llvm::createStringError(
104 std::errc::invalid_argument,
105 "language doesn't support getting vtable information");
123 llvm::StringRef abstract_type_name) {
143 return llvm::Error::success();
161 virtual std::optional<Value>
163 llvm::ArrayRef<uint8_t> &following) {
190 bool catch_bp,
bool throw_bp,
191 bool is_internal =
false);
210 bool catch_bp,
bool throw_bp) = 0;
213 return m_process->GetTarget().GetSearchFilterForModule(
nullptr);
216 virtual std::optional<uint64_t>
224 bool stop_others) = 0;
252 virtual bool isA(
const void *ClassID)
const {
return ClassID == &
ID; }
287 bool &behaves_like_zeroth_frame);
301 bool &behaves_like_zeroth_frame) {
static llvm::raw_ostream & error(Stream &strm)
A section + offset based address class.
Generic representation of a type in a programming language.
static SearchFilter * CreateFromStructuredData(Target &target, const StructuredData::Dictionary &data_dict, Status &error)
void UpdateModuleListIfNeeded()
bool ModulePasses(const lldb::ModuleSP &module_sp) override
Call this method with a Module to see if that module passes the filter.
ExceptionSearchFilter(const lldb::TargetSP &target_sp, lldb::LanguageType language, bool update_module_list=true)
void Search(Searcher &searcher) override
Call this method to do the search using the Searcher.
lldb::SearchFilterSP m_filter_sp
~ExceptionSearchFilter() override=default
lldb::LanguageType m_language
std::unique_ptr< SearchFilter > DoCreateCopy() override
StructuredData::ObjectSP SerializeToStructuredData() override
void GetDescription(Stream *s) override
Prints a canonical description for the search filter to the stream s.
LanguageRuntime * m_language_runtime
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
virtual llvm::Error FixupVariableLocation(Variable &variable, Value &value)
This allows a language runtime to adjust the location of variable computed from its debug info,...
virtual StructuredData::ObjectSP GetLanguageSpecificData(SymbolContext sc)
Language runtime plugins can use this API to report language-specific runtime information about this ...
virtual bool IsSymbolARuntimeThunk(const Symbol &symbol)
virtual std::optional< CompilerType > GetRuntimeType(CompilerType base_type)
LanguageRuntime(Process *process)
virtual void SetExceptionBreakpoints()
virtual lldb::LanguageType GetLanguageType() const =0
virtual TypeAndOrName FixUpDynamicType(const TypeAndOrName &type_and_or_name, ValueObject &static_value)=0
virtual lldb::ThreadSP GetBacktraceThreadFromException(lldb::ValueObjectSP thread_sp)
virtual bool GetDynamicTypeAndAddress(ValueObject &in_value, lldb::DynamicValueType use_dynamic, TypeAndOrName &class_type_or_name, Address &address, Value::ValueType &value_type, llvm::ArrayRef< uint8_t > &local_buffer)=0
This call should return true if it could set the name and/or the type Sets address to the address of ...
virtual lldb::UnwindPlanSP GetRuntimeUnwindPlan(lldb::ProcessSP process_sp, lldb_private::RegisterContext *regctx, bool &behaves_like_zeroth_frame)
virtual lldb::ValueObjectSP GetExceptionObjectForThread(lldb::ThreadSP thread_sp)
static LanguageRuntime * FindPlugin(Process *process, lldb::LanguageType language)
virtual lldb::ValueObjectSP GetErrorValueAtBackstop(StackFrame &frame)
Return the error value that reached the breakpoint from CreateErrorBackstopBreakpoint,...
virtual bool ExceptionBreakpointsExplainStop(lldb::StopInfoSP stop_reason)
virtual bool IsAllowedRuntimeValue(llvm::StringRef name)
Identify whether a name is a runtime value that should not be hidden by from the user interface.
virtual void ClearExceptionBreakpoints()
virtual LanguageRuntime * GetPreferredLanguageRuntime(ValueObject &in_value)
Return the preferred language runtime instance, which in most cases will be the current instance.
virtual lldb::ThreadPlanSP GetStepThroughTrampolinePlan(Thread &thread, bool stop_others)=0
virtual bool isA(const void *ClassID) const
virtual bool ExceptionBreakpointsAreSet()
static lldb::UnwindPlanSP GetRuntimeUnwindPlan(lldb_private::Thread &thread, lldb_private::RegisterContext *regctx, bool &behaves_like_zeroth_frame)
A language runtime may be able to provide a special UnwindPlan for the frame represented by the regis...
virtual llvm::Expected< VTableInfo > GetVTableInfo(ValueObject &in_value, bool check_type)
Get the vtable information for a given value.
void ModulesDidLoad(const ModuleList &module_list) override
Called when modules have been loaded in the process.
virtual DeclVendor * GetDeclVendor()
virtual lldb::addr_t LookupRuntimeSymbol(llvm::StringRef name)
virtual void SymbolsDidLoad(const ModuleList &module_list)
virtual std::optional< uint64_t > GetTypeBitSize(const CompilerType &compiler_type)
virtual lldb::BreakpointSP CreateErrorBackstopBreakpoint()
Create a breakpoint that catches an error escaping an expression that runs as top-level code,...
static lldb::BreakpointSP CreateExceptionBreakpoint(Target &target, lldb::LanguageType language, bool catch_bp, bool throw_bp, bool is_internal=false)
virtual bool GetIRPasses(LLVMUserExpression::IRPasses &custom_passes)
static void InitializeCommands(CommandObject *parent)
virtual bool CouldHaveDynamicValue(ValueObject &in_value)=0
virtual llvm::Error GetObjectDescription(Stream &str, Value &value, ExecutionContextScope *exe_scope)=0
virtual llvm::Error GetObjectDescription(Stream &str, ValueObject &object)=0
virtual std::optional< Value > EvaluateEntryValue(StackFrame &frame, llvm::ArrayRef< uint8_t > entry_value, llvm::ArrayRef< uint8_t > &following)
This allows a language runtime to evaluate DW_OP_entry_value(entry_value) in frame without call site ...
virtual lldb::SearchFilterSP CreateExceptionSearchFilter()
virtual CompilerType GetConcreteType(ExecutionContextScope *exe_scope, llvm::StringRef abstract_type_name)
virtual lldb::BreakpointResolverSP CreateExceptionResolver(const lldb::BreakpointSP &bkpt, bool catch_bp, bool throw_bp)=0
static lldb::BreakpointPreconditionSP GetExceptionPrecondition(lldb::LanguageType language, bool throw_bp)
A collection class for Module objects.
PluginInterface()=default
A plug-in interface definition class for debugging a process.
Runtime(Process *process)
SearchFilter(const lldb::TargetSP &target_sp)
The basic constructor takes a Target, which gives the space to search.
General Outline: Provides the callback and search depth for the SearchFilter search.
This base class provides an interface to stack frames.
A stream class that can stream formatted output to a file.
std::shared_ptr< Object > ObjectSP
Defines a symbol context baton that can be handed other debug core functions.
Sometimes you can find the name of the type corresponding to an object, but we don't have debug infor...
ValueType
Type that describes Value::m_value.
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ThreadPlan > ThreadPlanSP
std::shared_ptr< lldb_private::SearchFilter > SearchFilterSP
std::shared_ptr< lldb_private::BreakpointResolver > BreakpointResolverSP
std::shared_ptr< lldb_private::Thread > ThreadSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
LanguageType
Programming language type.
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::BreakpointPrecondition > BreakpointPreconditionSP
std::shared_ptr< lldb_private::UnwindPlan > UnwindPlanSP
std::shared_ptr< lldb_private::StopInfo > StopInfoSP
std::shared_ptr< lldb_private::Target > TargetSP
std::shared_ptr< lldb_private::Module > ModuleSP
Symbol * symbol
Address of the vtable's virtual function table.