LLDB mainline
|
#include <LanguageRuntime.h>
Classes | |
struct | VTableInfo |
Public Member Functions | |
virtual lldb::LanguageType | GetLanguageType () const =0 |
virtual LanguageRuntime * | GetPreferredLanguageRuntime (ValueObject &in_value) |
Return the preferred language runtime instance, which in most cases will be the current instance. | |
virtual llvm::Error | GetObjectDescription (Stream &str, ValueObject &object)=0 |
virtual llvm::Error | GetObjectDescription (Stream &str, Value &value, ExecutionContextScope *exe_scope)=0 |
virtual llvm::Expected< VTableInfo > | GetVTableInfo (ValueObject &in_value, bool check_type) |
Get the vtable information for a given value. | |
virtual bool | GetDynamicTypeAndAddress (ValueObject &in_value, lldb::DynamicValueType use_dynamic, TypeAndOrName &class_type_or_name, Address &address, Value::ValueType &value_type)=0 |
virtual CompilerType | GetConcreteType (ExecutionContextScope *exe_scope, ConstString abstract_type_name) |
virtual bool | CouldHaveDynamicValue (ValueObject &in_value)=0 |
virtual TypeAndOrName | FixUpDynamicType (const TypeAndOrName &type_and_or_name, ValueObject &static_value)=0 |
virtual void | SetExceptionBreakpoints () |
virtual void | ClearExceptionBreakpoints () |
virtual bool | ExceptionBreakpointsAreSet () |
virtual bool | ExceptionBreakpointsExplainStop (lldb::StopInfoSP stop_reason) |
virtual lldb::ValueObjectSP | GetExceptionObjectForThread (lldb::ThreadSP thread_sp) |
virtual lldb::ThreadSP | GetBacktraceThreadFromException (lldb::ValueObjectSP thread_sp) |
virtual DeclVendor * | GetDeclVendor () |
virtual lldb::BreakpointResolverSP | CreateExceptionResolver (const lldb::BreakpointSP &bkpt, bool catch_bp, bool throw_bp)=0 |
virtual lldb::SearchFilterSP | CreateExceptionSearchFilter () |
virtual std::optional< uint64_t > | GetTypeBitSize (const CompilerType &compiler_type) |
virtual void | SymbolsDidLoad (const ModuleList &module_list) |
virtual lldb::ThreadPlanSP | GetStepThroughTrampolinePlan (Thread &thread, bool stop_others)=0 |
virtual bool | IsAllowedRuntimeValue (ConstString name) |
Identify whether a name is a runtime value that should not be hidden by from the user interface. | |
virtual std::optional< CompilerType > | GetRuntimeType (CompilerType base_type) |
void | ModulesDidLoad (const ModuleList &module_list) override |
Called when modules have been loaded in the process. | |
virtual bool | GetIRPasses (LLVMUserExpression::IRPasses &custom_passes) |
virtual lldb::addr_t | LookupRuntimeSymbol (ConstString name) |
virtual bool | isA (const void *ClassID) const |
virtual StructuredData::ObjectSP | GetLanguageSpecificData (SymbolContext sc) |
Language runtime plugins can use this API to report language-specific runtime information about this compile unit, such as additional language version details or feature flags. | |
Public Member Functions inherited from lldb_private::Runtime | |
Runtime (Process *process) | |
virtual | ~Runtime ()=default |
Runtime (const Runtime &)=delete | |
const Runtime & | operator= (const Runtime &)=delete |
Process * | GetProcess () |
Target & | GetTargetRef () |
virtual void | ModulesDidLoad (const ModuleList &module_list)=0 |
Called when modules have been loaded in the process. | |
Public Member Functions inherited from lldb_private::PluginInterface | |
PluginInterface ()=default | |
virtual | ~PluginInterface ()=default |
virtual llvm::StringRef | GetPluginName ()=0 |
PluginInterface (const PluginInterface &)=delete | |
PluginInterface & | operator= (const PluginInterface &)=delete |
Static Public Member Functions | |
static LanguageRuntime * | FindPlugin (Process *process, lldb::LanguageType language) |
static void | InitializeCommands (CommandObject *parent) |
static lldb::BreakpointSP | CreateExceptionBreakpoint (Target &target, lldb::LanguageType language, bool catch_bp, bool throw_bp, bool is_internal=false) |
static lldb::BreakpointPreconditionSP | GetExceptionPrecondition (lldb::LanguageType language, bool throw_bp) |
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 register contents regctx when that frame is not following the normal ABI conventions. | |
Static Public Attributes | |
static char | ID = 0 |
Protected Member Functions | |
virtual lldb::UnwindPlanSP | GetRuntimeUnwindPlan (lldb::ProcessSP process_sp, lldb_private::RegisterContext *regctx, bool &behaves_like_zeroth_frame) |
LanguageRuntime (Process *process) | |
Additional Inherited Members | |
Protected Attributes inherited from lldb_private::Runtime | |
Process * | m_process |
Definition at line 61 of file LanguageRuntime.h.
|
protected |
Definition at line 216 of file LanguageRuntime.cpp.
|
inlinevirtual |
Reimplemented in lldb_private::ItaniumABILanguageRuntime, and lldb_private::AppleObjCRuntime.
Definition at line 137 of file LanguageRuntime.h.
Referenced by lldb_private::ThreadPlanCallFunction::ClearBreakpoints().
|
pure virtual |
Implemented in lldb_private::ItaniumABILanguageRuntime, lldb_private::AppleObjCRuntime, and lldb_private::GNUstepObjCRuntime.
Referenced by lldb_private::Process::IsPossibleDynamicValue().
|
static |
Definition at line 238 of file LanguageRuntime.cpp.
References lldb_private::Target::CreateBreakpoint(), and GetExceptionPrecondition().
Referenced by lldb_private::Target::CreateExceptionBreakpoint(), and lldb_private::AppleObjCRuntime::SetExceptionBreakpoints().
|
pure virtual |
|
inlinevirtual |
Reimplemented in lldb_private::ItaniumABILanguageRuntime, and lldb_private::AppleObjCRuntime.
Definition at line 169 of file LanguageRuntime.h.
References lldb_private::Target::GetSearchFilterForModule(), lldb_private::Process::GetTarget(), and lldb_private::Runtime::m_process.
Referenced by lldb_private::ExceptionSearchFilter::UpdateModuleListIfNeeded().
|
inlinevirtual |
Reimplemented in lldb_private::ItaniumABILanguageRuntime, and lldb_private::AppleObjCRuntime.
Definition at line 139 of file LanguageRuntime.h.
Referenced by lldb_private::ThreadPlanCallFunction::SetBreakpoints().
|
inlinevirtual |
Reimplemented in lldb_private::ItaniumABILanguageRuntime, and lldb_private::AppleObjCRuntime.
Definition at line 141 of file LanguageRuntime.h.
Referenced by lldb_private::ThreadPlanCallFunction::BreakpointsExplainStop().
|
static |
Definition at line 202 of file LanguageRuntime.cpp.
References lldb_private::PluginManager::GetLanguageRuntimeCreateCallbackAtIndex().
Referenced by lldb_private::Process::GetLanguageRuntime().
|
pure virtual |
Implemented in lldb_private::ItaniumABILanguageRuntime, lldb_private::AppleObjCRuntime, and lldb_private::GNUstepObjCRuntime.
Referenced by lldb_private::ValueObjectDynamicValue::UpdateValue().
|
inlinevirtual |
Reimplemented in lldb_private::AppleObjCRuntime.
Definition at line 158 of file LanguageRuntime.h.
|
inlinevirtual |
Definition at line 118 of file LanguageRuntime.h.
|
inlinevirtual |
Reimplemented in lldb_private::AppleObjCRuntimeV1, and lldb_private::AppleObjCRuntimeV2.
Definition at line 163 of file LanguageRuntime.h.
Referenced by lldb_private::AppleObjCTypeEncodingParser::BuildObjCObjectPointerType(), lldb_private::ClangASTSource::FindDeclInObjCRuntime(), lldb_private::ClangASTSource::FindObjCMethodDecls(), and lldb_private::ClangASTSource::FindObjCPropertyAndIvarDecls().
|
pure virtual |
|
inlinevirtual |
Reimplemented in lldb_private::ItaniumABILanguageRuntime, and lldb_private::AppleObjCRuntime.
Definition at line 153 of file LanguageRuntime.h.
|
static |
Definition at line 219 of file LanguageRuntime.cpp.
References lldb_private::PluginManager::GetLanguageRuntimeCreateCallbackAtIndex(), and lldb_private::PluginManager::GetLanguageRuntimeGetExceptionPreconditionAtIndex().
Referenced by CreateExceptionBreakpoint().
|
inlinevirtual |
Definition at line 196 of file LanguageRuntime.h.
|
virtual |
Language runtime plugins can use this API to report language-specific runtime information about this compile unit, such as additional language version details or feature flags.
Reimplemented in lldb_private::AppleObjCRuntimeV2.
Definition at line 281 of file LanguageRuntime.cpp.
|
pure virtual |
Implemented in lldb_private::CPPLanguageRuntime, and lldb_private::ObjCLanguageRuntime.
Referenced by lldb_private::Process::GetLanguageRuntime().
|
pure virtual |
Implemented in lldb_private::CPPLanguageRuntime, lldb_private::AppleObjCRuntime, and lldb_private::GNUstepObjCRuntime.
|
pure virtual |
Implemented in lldb_private::CPPLanguageRuntime, lldb_private::AppleObjCRuntime, and lldb_private::GNUstepObjCRuntime.
|
inlinevirtual |
Return the preferred language runtime instance, which in most cases will be the current instance.
Reimplemented in lldb_private::AppleObjCRuntimeV2.
Definition at line 72 of file LanguageRuntime.h.
Referenced by lldb_private::ValueObjectDynamicValue::UpdateValue().
|
inlinevirtual |
Reimplemented in lldb_private::ObjCLanguageRuntime.
Definition at line 187 of file LanguageRuntime.h.
|
inlineprotectedvirtual |
Definition at line 254 of file LanguageRuntime.h.
|
static |
A language runtime may be able to provide a special UnwindPlan for the frame represented by the register contents regctx when that frame is not following the normal ABI conventions.
Instead of using the normal UnwindPlan for the function, we will use this special UnwindPlan for this one backtrace. One example of this would be a language that has asynchronous functions, functions that may not be currently-executing, while waiting on other asynchronous calls they made, but are part of a logical backtrace that we want to show the developer because that's how they think of the program flow.
[in] | thread | The thread that the unwind is happening on. |
[in] | regctx | The RegisterContext for the frame we need to create an UnwindPlan. We don't yet have a StackFrame when we're selecting the UnwindPlan. |
[out] | behaves_like_zeroth_frame | With normal ABI calls, all stack frames except the zeroth frame need to have the return-pc value backed up by 1 for symbolication purposes. For these LanguageRuntime unwind plans, they may not follow normal ABI calling conventions and the return pc may need to be symbolicated as-is. |
Definition at line 262 of file LanguageRuntime.cpp.
References lldb_private::Thread::GetProcess(), and lldb_private::Language::GetSupportedLanguages().
Referenced by lldb_private::RegisterContextUnwind::InitializeNonZerothFrame(), and lldb_private::RegisterContextUnwind::InitializeZerothFrame().
|
pure virtual |
|
inlinevirtual |
Reimplemented in lldb_private::ObjCLanguageRuntime.
Definition at line 174 of file LanguageRuntime.h.
|
inlinevirtual |
Get the vtable information for a given value.
[in] | in_value | The value object to try and extract the VTableInfo from. |
[in] | check_type | If true, the compiler type of in_value will be checked to see if it is an instance to, or pointer or reference to a class or struct that has a vtable. If the type doesn't meet the requirements, an error will be returned explaining why the type isn't suitable. |
Reimplemented in lldb_private::ItaniumABILanguageRuntime.
Definition at line 101 of file LanguageRuntime.h.
Referenced by lldb_private::ValueObjectVTable::UpdateValue().
|
static |
Definition at line 285 of file LanguageRuntime.cpp.
References lldb_private::CommandObject::GetCommandInterpreter(), lldb_private::PluginManager::GetLanguageRuntimeCreateCallbackAtIndex(), lldb_private::PluginManager::GetLanguageRuntimeGetCommandObjectAtIndex(), lldb_private::CommandObject::IsMultiwordObject(), and lldb_private::CommandObject::LoadSubCommand().
Referenced by lldb_private::CommandObjectLanguage::CommandObjectLanguage().
|
inlinevirtual |
Reimplemented in lldb_private::CPPLanguageRuntime, lldb_private::ItaniumABILanguageRuntime, lldb_private::AppleObjCRuntime, lldb_private::AppleObjCRuntimeV1, lldb_private::AppleObjCRuntimeV2, lldb_private::GNUstepObjCRuntime, and lldb_private::ObjCLanguageRuntime.
Definition at line 207 of file LanguageRuntime.h.
References ID.
Referenced by lldb_private::CPPLanguageRuntime::classof(), lldb_private::ItaniumABILanguageRuntime::classof(), lldb_private::AppleObjCRuntime::classof(), lldb_private::AppleObjCRuntimeV1::classof(), lldb_private::AppleObjCRuntimeV2::classof(), lldb_private::GNUstepObjCRuntime::classof(), lldb_private::ObjCLanguageRuntime::classof(), lldb_private::CPPLanguageRuntime::isA(), and lldb_private::ObjCLanguageRuntime::isA().
|
inlinevirtual |
Identify whether a name is a runtime value that should not be hidden by from the user interface.
Reimplemented in lldb_private::CPPLanguageRuntime, and lldb_private::ObjCLanguageRuntime.
Definition at line 185 of file LanguageRuntime.h.
|
inlinevirtual |
Reimplemented in lldb_private::AppleObjCRuntimeV2.
Definition at line 203 of file LanguageRuntime.h.
References LLDB_INVALID_ADDRESS.
Referenced by lldb_private::ClangExpressionDeclMap::GetSymbolAddress().
|
inlineoverridevirtual |
Called when modules have been loaded in the process.
Implements lldb_private::Runtime.
Reimplemented in lldb_private::AppleObjCRuntime, lldb_private::AppleObjCRuntimeV2, and lldb_private::GNUstepObjCRuntime.
Definition at line 191 of file LanguageRuntime.h.
|
inlinevirtual |
Reimplemented in lldb_private::ItaniumABILanguageRuntime, and lldb_private::AppleObjCRuntime.
Definition at line 135 of file LanguageRuntime.h.
Referenced by lldb_private::ThreadPlanCallFunction::SetBreakpoints().
|
inlinevirtual |
Reimplemented in lldb_private::ObjCLanguageRuntime.
Definition at line 178 of file LanguageRuntime.h.
|
static |
Definition at line 208 of file LanguageRuntime.h.
Referenced by isA().