|
LLDB mainline
|
#include <CPPLanguageRuntime.h>
Classes | |
| struct | LibCppStdFunctionCallableInfo |
Public Types | |
| enum class | LibCppStdFunctionCallableCase { Lambda = 0 , CallableObject , FreeOrMemberFunction , Invalid } |
Public Member Functions | |
| LibCppStdFunctionCallableInfo | FindLibCppStdFunctionCallableInfo (lldb::ValueObjectSP &valobj_sp) |
| llvm::StringRef | GetPluginName () override |
| bool | isA (const void *ClassID) const override |
| lldb::LanguageType | GetLanguageType () const override |
| llvm::Error | GetObjectDescription (Stream &str, ValueObject &object) override |
| llvm::Error | GetObjectDescription (Stream &str, Value &value, ExecutionContextScope *exe_scope) override |
| lldb::ThreadPlanSP | GetStepThroughTrampolinePlan (Thread &thread, bool stop_others) override |
| Obtain a ThreadPlan to get us into C++ constructs such as std::function. | |
| bool | IsAllowedRuntimeValue (ConstString name) override |
| Identify whether a name is a runtime value that should not be hidden by from the user interface. | |
| bool | IsSymbolARuntimeThunk (const Symbol &symbol) override |
| llvm::Expected< LanguageRuntime::VTableInfo > | GetVTableInfo (ValueObject &in_value, bool check_type) override |
| Get the vtable information for a given value. | |
| 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) override |
| This call should return true if it could set the name and/or the type Sets address to the address of the dynamic type if value_type is set to a file or load address. | |
| TypeAndOrName | FixUpDynamicType (const TypeAndOrName &type_and_or_name, ValueObject &static_value) override |
| bool | CouldHaveDynamicValue (ValueObject &in_value) override |
| void | SetExceptionBreakpoints () override |
| void | ClearExceptionBreakpoints () override |
| bool | ExceptionBreakpointsAreSet () override |
| bool | ExceptionBreakpointsExplainStop (lldb::StopInfoSP stop_reason) override |
| lldb::BreakpointResolverSP | CreateExceptionResolver (const lldb::BreakpointSP &bkpt, bool catch_bp, bool throw_bp) override |
| lldb::SearchFilterSP | CreateExceptionSearchFilter () override |
| lldb::ValueObjectSP | GetExceptionObjectForThread (lldb::ThreadSP thread_sp) override |
| Public Member Functions inherited from lldb_private::LanguageRuntime | |
| virtual LanguageRuntime * | GetPreferredLanguageRuntime (ValueObject &in_value) |
| Return the preferred language runtime instance, which in most cases will be the current instance. | |
| virtual CompilerType | GetConcreteType (ExecutionContextScope *exe_scope, ConstString abstract_type_name) |
| virtual lldb::ThreadSP | GetBacktraceThreadFromException (lldb::ValueObjectSP thread_sp) |
| virtual DeclVendor * | GetDeclVendor () |
| virtual std::optional< uint64_t > | GetTypeBitSize (const CompilerType &compiler_type) |
| virtual void | SymbolsDidLoad (const ModuleList &module_list) |
| 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 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 () |
| Public Member Functions inherited from lldb_private::PluginInterface | |
| PluginInterface ()=default | |
| virtual | ~PluginInterface ()=default |
| PluginInterface (const PluginInterface &)=delete | |
| PluginInterface & | operator= (const PluginInterface &)=delete |
Static Public Member Functions | |
| static void | Initialize () |
| static void | Terminate () |
| static lldb_private::LanguageRuntime * | CreateInstance (Process *process, lldb::LanguageType language) |
| static llvm::StringRef | GetPluginNameStatic () |
| static bool | classof (const LanguageRuntime *runtime) |
| static CPPLanguageRuntime * | Get (Process &process) |
| Static Public Member Functions inherited from lldb_private::LanguageRuntime | |
| 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 |
| Static Public Attributes inherited from lldb_private::LanguageRuntime | |
| static char | ID = 0 |
Private Types | |
| using | OperatorStringToCallableInfoMap |
Private Member Functions | |
| CPPLanguageRuntime (Process *process) | |
| lldb::BreakpointResolverSP | CreateExceptionResolver (const lldb::BreakpointSP &bkpt, bool catch_bp, bool throw_bp, bool for_expressions) |
| lldb::BreakpointSP | CreateExceptionBreakpoint (bool catch_bp, bool throw_bp, bool for_expressions, bool is_internal) |
Private Attributes | |
| OperatorStringToCallableInfoMap | CallableLookupCache |
| lldb::BreakpointSP | m_cxx_exception_bp_sp |
| ItaniumABIRuntime | m_itanium_runtime |
Additional Inherited Members | |
| Protected Member Functions inherited from lldb_private::LanguageRuntime | |
| virtual lldb::UnwindPlanSP | GetRuntimeUnwindPlan (lldb::ProcessSP process_sp, lldb_private::RegisterContext *regctx, bool &behaves_like_zeroth_frame) |
| LanguageRuntime (Process *process) | |
| Protected Attributes inherited from lldb_private::Runtime | |
| Process * | m_process |
Definition at line 23 of file CPPLanguageRuntime.h.
Definition at line 140 of file CPPLanguageRuntime.h.
|
strong |
| Enumerator | |
|---|---|
| Lambda | |
| CallableObject | |
| FreeOrMemberFunction | |
| Invalid | |
Definition at line 25 of file CPPLanguageRuntime.h.
|
private |
Definition at line 112 of file CPPLanguageRuntime.cpp.
References lldb_private::StackFrameRecognizerManager::AddRecognizer(), lldb_private::Mangled::ePreferDemangledWithoutArguments, lldb_private::Target::GetFrameRecognizerManager(), lldb_private::Process::GetTarget(), lldb_private::LanguageRuntime::LanguageRuntime(), m_itanium_runtime, and lldb_private::RegisterVerboseTrapFrameRecognizer().
Referenced by CreateInstance(), and Get().
|
inlinestatic |
Definition at line 63 of file CPPLanguageRuntime.h.
References ID, lldb_private::LanguageRuntime::isA(), and lldb_private::LanguageRuntime::LanguageRuntime().
|
overridevirtual |
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 647 of file CPPLanguageRuntime.cpp.
References m_cxx_exception_bp_sp, and lldb_private::Runtime::m_process.
|
overridevirtual |
Implements lldb_private::LanguageRuntime.
Definition at line 498 of file CPPLanguageRuntime.cpp.
References lldb_private::ValueObject::GetCompilerType(), and lldb_private::CompilerType::IsPossibleDynamicType().
Referenced by GetDynamicTypeAndAddress().
|
private |
Definition at line 612 of file CPPLanguageRuntime.cpp.
References lldb_private::Target::CreateBreakpoint(), CreateExceptionResolver(), CreateExceptionSearchFilter(), and lldb_private::Runtime::m_process.
Referenced by SetExceptionBreakpoints().
|
overridevirtual |
Implements lldb_private::LanguageRuntime.
Definition at line 583 of file CPPLanguageRuntime.cpp.
References CreateExceptionResolver().
Referenced by CreateExceptionBreakpoint(), and CreateExceptionResolver().
|
private |
Definition at line 589 of file CPPLanguageRuntime.cpp.
References lldb::eLanguageTypeUnknown, lldb_private::eLazyBoolNo, and m_itanium_runtime.
|
overridevirtual |
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 603 of file CPPLanguageRuntime.cpp.
References lldb_private::Target::GetSearchFilterForModuleList(), m_itanium_runtime, and lldb_private::Runtime::m_process.
Referenced by CreateExceptionBreakpoint().
|
static |
Definition at line 554 of file CPPLanguageRuntime.cpp.
References CPPLanguageRuntime(), lldb::eLanguageTypeC_plus_plus, lldb::eLanguageTypeC_plus_plus_03, lldb::eLanguageTypeC_plus_plus_11, and lldb::eLanguageTypeC_plus_plus_14.
Referenced by Initialize(), and Terminate().
|
overridevirtual |
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 656 of file CPPLanguageRuntime.cpp.
References m_cxx_exception_bp_sp.
|
overridevirtual |
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 660 of file CPPLanguageRuntime.cpp.
References lldb::eStopReasonBreakpoint, m_cxx_exception_bp_sp, and lldb_private::Runtime::m_process.
| CPPLanguageRuntime::LibCppStdFunctionCallableInfo CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo | ( | lldb::ValueObjectSP & | valobj_sp | ) |
Definition at line 179 of file CPPLanguageRuntime.cpp.
References lldb_private::Address::CalculateSymbolContextCompileUnit(), lldb_private::CPPLanguageRuntime::LibCppStdFunctionCallableInfo::callable_address, lldb_private::CPPLanguageRuntime::LibCppStdFunctionCallableInfo::callable_case, lldb_private::CPPLanguageRuntime::LibCppStdFunctionCallableInfo::callable_symbol, CallableLookupCache, contains_lambda_identifier(), lldb_private::Status::Fail(), lldb_private::CompileUnit::FindFunction(), FreeOrMemberFunction, lldb_private::Process::GetAddressByteSize(), lldb_private::Target::GetImages(), lldb_private::Symbol::GetName(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::SymbolContextList::GetSize(), lldb_private::ConstString::GetStringRef(), lldb_private::Process::GetTarget(), lldb_private::Target::HasLoadedSections(), line_entry_helper(), LLDB_SCOPED_TIMER, lldb_private::CPPLanguageRuntime::LibCppStdFunctionCallableInfo::member_f_pointer_value, lldb_private::Process::ReadPointerFromMemory(), lldb_private::Target::ResolveLoadAddress(), lldb_private::ModuleList::ResolveSymbolContextForAddress(), and lldb_private::SymbolContext::symbol.
Referenced by GetStepThroughTrampolinePlan(), and lldb_private::formatters::LibcxxFunctionSummaryProvider().
|
overridevirtual |
Implements lldb_private::LanguageRuntime.
Definition at line 520 of file CPPLanguageRuntime.cpp.
References lldb_private::Flags::AllSet(), lldb_private::TypeAndOrName::GetCompilerType(), lldb_private::ValueObject::GetCompilerType(), lldb_private::ConstString::GetCString(), lldb_private::CompilerType::GetLValueReferenceType(), lldb_private::TypeAndOrName::GetName(), lldb_private::CompilerType::GetPointerType(), lldb_private::CompilerType::GetTypeInfo(), lldb_private::TypeAndOrName::HasType(), lldb_private::TypeAndOrName::SetCompilerType(), and lldb_private::TypeAndOrName::SetName().
|
inlinestatic |
Definition at line 71 of file CPPLanguageRuntime.h.
References CPPLanguageRuntime(), lldb::eLanguageTypeC_plus_plus, and lldb_private::Process::GetLanguageRuntime().
Referenced by lldb_private::formatters::LibcxxFunctionSummaryProvider().
|
overridevirtual |
This call should return true if it could set the name and/or the type Sets address to the address of the dynamic type if value_type is set to a file or load address.
Sets local_buffer to a buffer containing the data of the dynamic type if value_type is set to a host address. Callers should copy local_buffer over into their own buffer if they want to keep the data alive.
Implements lldb_private::LanguageRuntime.
Definition at line 505 of file CPPLanguageRuntime.cpp.
References lldb_private::TypeAndOrName::Clear(), CouldHaveDynamicValue(), m_itanium_runtime, and lldb_private::Value::Scalar.
|
overridevirtual |
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 674 of file CPPLanguageRuntime.cpp.
References m_itanium_runtime.
|
inlineoverridevirtual |
Implements lldb_private::LanguageRuntime.
Definition at line 67 of file CPPLanguageRuntime.h.
References lldb::eLanguageTypeC_plus_plus.
|
overridevirtual |
Implements lldb_private::LanguageRuntime.
Definition at line 136 of file CPPLanguageRuntime.cpp.
|
overridevirtual |
Implements lldb_private::LanguageRuntime.
Definition at line 129 of file CPPLanguageRuntime.cpp.
|
inlineoverridevirtual |
Implements lldb_private::PluginInterface.
Definition at line 57 of file CPPLanguageRuntime.h.
References GetPluginNameStatic().
|
inlinestatic |
Definition at line 53 of file CPPLanguageRuntime.h.
Referenced by GetPluginName(), and Initialize().
|
overridevirtual |
Obtain a ThreadPlan to get us into C++ constructs such as std::function.
| [in] | thread | Current thrad of execution. |
| [in] | stop_others | True if other threads should pause during execution. |
Implements lldb_private::LanguageRuntime.
Definition at line 416 of file CPPLanguageRuntime.cpp.
References lldb_private::CPPLanguageRuntime::LibCppStdFunctionCallableInfo::callable_address, lldb_private::CPPLanguageRuntime::LibCppStdFunctionCallableInfo::callable_case, lldb_private::eLazyBoolYes, lldb::eOnlyThisThread, FindLibCppStdFunctionCallableInfo(), g_this, lldb_private::SymbolContext::GetAddressRange(), lldb_private::ConstString::GetCString(), lldb_private::Symbol::GetName(), Invalid, and lldb_private::SymbolContext::symbol.
|
overridevirtual |
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 from lldb_private::LanguageRuntime.
Definition at line 578 of file CPPLanguageRuntime.cpp.
References m_itanium_runtime.
|
static |
Definition at line 565 of file CPPLanguageRuntime.cpp.
References CreateInstance(), GetPluginNameStatic(), and lldb_private::PluginManager::RegisterPlugin().
|
inlineoverridevirtual |
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 59 of file CPPLanguageRuntime.h.
References ID, and lldb_private::LanguageRuntime::isA().
|
overridevirtual |
Identify whether a name is a runtime value that should not be hidden by from the user interface.
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 125 of file CPPLanguageRuntime.cpp.
References g_coro_frame, g_promise, and g_this.
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 487 of file CPPLanguageRuntime.cpp.
References lldb_private::Symbol::GetMangled(), lldb_private::Mangled::GetMangledName(), and lldb_private::ConstString::GetStringRef().
|
overridevirtual |
Reimplemented from lldb_private::LanguageRuntime.
Definition at line 625 of file CPPLanguageRuntime.cpp.
References CreateExceptionBreakpoint(), m_cxx_exception_bp_sp, and lldb_private::Runtime::m_process.
|
static |
Definition at line 573 of file CPPLanguageRuntime.cpp.
References CreateInstance(), and lldb_private::PluginManager::UnregisterPlugin().
|
private |
Definition at line 143 of file CPPLanguageRuntime.h.
Referenced by FindLibCppStdFunctionCallableInfo().
|
static |
Definition at line 44 of file CPPLanguageRuntime.h.
|
private |
Definition at line 145 of file CPPLanguageRuntime.h.
Referenced by ClearExceptionBreakpoints(), ExceptionBreakpointsAreSet(), ExceptionBreakpointsExplainStop(), and SetExceptionBreakpoints().
|
private |
Definition at line 146 of file CPPLanguageRuntime.h.
Referenced by CPPLanguageRuntime(), CreateExceptionResolver(), CreateExceptionSearchFilter(), GetDynamicTypeAndAddress(), GetExceptionObjectForThread(), and GetVTableInfo().