LLDB mainline
lldb_private::ItaniumABILanguageRuntime Class Reference

#include <ItaniumABILanguageRuntime.h>

Inheritance diagram for lldb_private::ItaniumABILanguageRuntime:
[legend]

Public Member Functions

 ~ItaniumABILanguageRuntime () override=default
bool isA (const void *ClassID) const override
llvm::Expected< LanguageRuntime::VTableInfoGetVTableInfo (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
llvm::StringRef GetPluginName () override
Public Member Functions inherited from lldb_private::CPPLanguageRuntime
LibCppStdFunctionCallableInfo FindLibCppStdFunctionCallableInfo (lldb::ValueObjectSP &valobj_sp)
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
Public Member Functions inherited from lldb_private::LanguageRuntime
virtual LanguageRuntimeGetPreferredLanguageRuntime (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 DeclVendorGetDeclVendor ()
virtual std::optional< uint64_t > GetTypeBitSize (const CompilerType &compiler_type)
virtual void SymbolsDidLoad (const ModuleList &module_list)
virtual std::optional< CompilerTypeGetRuntimeType (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 Runtimeoperator= (const Runtime &)=delete
ProcessGetProcess ()
TargetGetTargetRef ()
Public Member Functions inherited from lldb_private::PluginInterface
 PluginInterface ()=default
virtual ~PluginInterface ()=default
 PluginInterface (const PluginInterface &)=delete
PluginInterfaceoperator= (const PluginInterface &)=delete

Static Public Member Functions

static void Initialize ()
static void Terminate ()
static lldb_private::LanguageRuntimeCreateInstance (Process *process, lldb::LanguageType language)
static llvm::StringRef GetPluginNameStatic ()
static bool classof (const LanguageRuntime *runtime)
Static Public Member Functions inherited from lldb_private::CPPLanguageRuntime
static bool classof (const LanguageRuntime *runtime)
static CPPLanguageRuntimeGet (Process &process)
Static Public Member Functions inherited from lldb_private::LanguageRuntime
static LanguageRuntimeFindPlugin (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::CPPLanguageRuntime
static char ID = 0
Static Public Attributes inherited from lldb_private::LanguageRuntime
static char ID = 0

Protected Member Functions

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)
Protected Member Functions inherited from lldb_private::CPPLanguageRuntime
 CPPLanguageRuntime (Process *process)
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)

Private Types

typedef std::map< lldb_private::Address, TypeAndOrNameDynamicTypeCache
typedef std::map< lldb_private::Address, VTableInfoVTableInfoCache

Private Member Functions

 ItaniumABILanguageRuntime (Process *process)
TypeAndOrName GetTypeInfo (ValueObject &in_value, const VTableInfo &vtable_info)
TypeAndOrName GetDynamicTypeInfo (const lldb_private::Address &vtable_addr)
void SetDynamicTypeInfo (const lldb_private::Address &vtable_addr, const TypeAndOrName &type_info)
llvm::Error TypeHasVTable (CompilerType compiler_type)

Private Attributes

lldb::BreakpointSP m_cxx_exception_bp_sp
DynamicTypeCache m_dynamic_type_map
VTableInfoCache m_vtable_info_map
std::mutex m_mutex

Additional Inherited Members

Public Types inherited from lldb_private::CPPLanguageRuntime
enum class  LibCppStdFunctionCallableCase { Lambda = 0 , CallableObject , FreeOrMemberFunction , Invalid }
Protected Attributes inherited from lldb_private::Runtime
Processm_process

Detailed Description

Definition at line 26 of file ItaniumABILanguageRuntime.h.

Member Typedef Documentation

◆ DynamicTypeCache

◆ VTableInfoCache

Constructor & Destructor Documentation

◆ ~ItaniumABILanguageRuntime()

lldb_private::ItaniumABILanguageRuntime::~ItaniumABILanguageRuntime ( )
overridedefault

◆ ItaniumABILanguageRuntime()

lldb_private::ItaniumABILanguageRuntime::ItaniumABILanguageRuntime ( Process * process)
inlineprivate

Member Function Documentation

◆ classof()

bool lldb_private::ItaniumABILanguageRuntime::classof ( const LanguageRuntime * runtime)
inlinestatic

Definition at line 46 of file ItaniumABILanguageRuntime.h.

References ID, and lldb_private::LanguageRuntime::isA().

◆ ClearExceptionBreakpoints()

void ItaniumABILanguageRuntime::ClearExceptionBreakpoints ( )
overridevirtual

◆ CouldHaveDynamicValue()

bool ItaniumABILanguageRuntime::CouldHaveDynamicValue ( ValueObject & in_value)
overridevirtual

◆ CreateExceptionBreakpoint()

lldb::BreakpointSP ItaniumABILanguageRuntime::CreateExceptionBreakpoint ( bool catch_bp,
bool throw_bp,
bool for_expressions,
bool is_internal )
protected

◆ CreateExceptionResolver() [1/2]

BreakpointResolverSP ItaniumABILanguageRuntime::CreateExceptionResolver ( const lldb::BreakpointSP & bkpt,
bool catch_bp,
bool throw_bp )
overridevirtual

◆ CreateExceptionResolver() [2/2]

BreakpointResolverSP ItaniumABILanguageRuntime::CreateExceptionResolver ( const lldb::BreakpointSP & bkpt,
bool catch_bp,
bool throw_bp,
bool for_expressions )
protected

◆ CreateExceptionSearchFilter()

◆ CreateInstance()

◆ ExceptionBreakpointsAreSet()

bool ItaniumABILanguageRuntime::ExceptionBreakpointsAreSet ( )
overridevirtual

Reimplemented from lldb_private::LanguageRuntime.

Definition at line 587 of file ItaniumABILanguageRuntime.cpp.

References m_cxx_exception_bp_sp.

◆ ExceptionBreakpointsExplainStop()

bool ItaniumABILanguageRuntime::ExceptionBreakpointsExplainStop ( lldb::StopInfoSP stop_reason)
overridevirtual

◆ FixUpDynamicType()

◆ GetDynamicTypeAndAddress()

bool ItaniumABILanguageRuntime::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 )
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 283 of file ItaniumABILanguageRuntime.cpp.

References lldb_private::LanguageRuntime::VTableInfo::addr, lldb_private::ValueObject::AddrAndType::address, lldb_private::TypeSystemClang::AreTypesSame(), lldb_private::TypeAndOrName::Clear(), CouldHaveDynamicValue(), error(), lldb_private::TypeAndOrName::GetCompilerType(), lldb_private::ValueObject::GetCompilerType(), lldb_private::Address::GetLoadAddress(), lldb_private::ValueObject::GetPointerValue(), GetTypeInfo(), GetVTableInfo(), LLDB_INVALID_ADDRESS, lldb_private::Runtime::m_process, lldb_private::Target::ReadSignedIntegerFromMemory(), lldb_private::Value::Scalar, and lldb_private::Address::SetRawAddress().

◆ GetDynamicTypeInfo()

TypeAndOrName ItaniumABILanguageRuntime::GetDynamicTypeInfo ( const lldb_private::Address & vtable_addr)
private

Definition at line 676 of file ItaniumABILanguageRuntime.cpp.

References m_dynamic_type_map, and m_mutex.

Referenced by GetTypeInfo().

◆ GetExceptionObjectForThread()

◆ GetPluginName()

llvm::StringRef lldb_private::ItaniumABILanguageRuntime::GetPluginName ( )
inlineoverridevirtual

Implements lldb_private::PluginInterface.

Definition at line 83 of file ItaniumABILanguageRuntime.h.

References GetPluginNameStatic().

◆ GetPluginNameStatic()

llvm::StringRef lldb_private::ItaniumABILanguageRuntime::GetPluginNameStatic ( )
inlinestatic

Definition at line 38 of file ItaniumABILanguageRuntime.h.

Referenced by GetPluginName(), and Initialize().

◆ GetTypeInfo()

◆ GetVTableInfo()

llvm::Expected< LanguageRuntime::VTableInfo > ItaniumABILanguageRuntime::GetVTableInfo ( ValueObject & in_value,
bool check_type )
overridevirtual

Get the vtable information for a given value.

Parameters
[in]in_valueThe value object to try and extract the VTableInfo from.
[in]check_typeIf 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.
Returns
An error if anything goes wrong while trying to extract the vtable or if check_type is true and the type doesn't have a vtable.

Reimplemented from lldb_private::LanguageRuntime.

Definition at line 216 of file ItaniumABILanguageRuntime.cpp.

References lldb_private::Address::CalculateSymbolContextSymbol(), lldb_private::eAddressTypeLoad, error(), lldb_private::Process::FixDataAddress(), lldb_private::ValueObject::GetAddressOf(), lldb_private::ValueObject::GetCompilerType(), lldb_private::Mangled::GetDemangledName(), lldb_private::ValueObject::GetExecutionContextRef(), lldb_private::Symbol::GetMangled(), lldb_private::ValueObject::GetPointerValue(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::ConstString::GetStringRef(), lldb_private::Process::GetTarget(), lldb_private::CompilerType::IsPointerOrReferenceType(), LLDB_INVALID_ADDRESS, m_mutex, m_vtable_info_map, lldb_private::Process::ReadPointerFromMemory(), lldb_private::Target::ResolveLoadAddress(), TypeHasVTable(), and vtable_demangled_prefix.

Referenced by GetDynamicTypeAndAddress().

◆ Initialize()

void ItaniumABILanguageRuntime::Initialize ( )
static

◆ isA()

bool lldb_private::ItaniumABILanguageRuntime::isA ( const void * ClassID) const
inlineoverridevirtual

Reimplemented from lldb_private::CPPLanguageRuntime.

Definition at line 42 of file ItaniumABILanguageRuntime.h.

References ID, and lldb_private::CPPLanguageRuntime::isA().

◆ SetDynamicTypeInfo()

void ItaniumABILanguageRuntime::SetDynamicTypeInfo ( const lldb_private::Address & vtable_addr,
const TypeAndOrName & type_info )
private

Definition at line 686 of file ItaniumABILanguageRuntime.cpp.

References m_dynamic_type_map, and m_mutex.

Referenced by GetTypeInfo().

◆ SetExceptionBreakpoints()

void ItaniumABILanguageRuntime::SetExceptionBreakpoints ( )
overridevirtual

◆ Terminate()

void ItaniumABILanguageRuntime::Terminate ( )
static

◆ TypeHasVTable()

Member Data Documentation

◆ ID

char ItaniumABILanguageRuntime::ID = 0
static

Definition at line 40 of file ItaniumABILanguageRuntime.h.

Referenced by classof(), and isA().

◆ m_cxx_exception_bp_sp

lldb::BreakpointSP lldb_private::ItaniumABILanguageRuntime::m_cxx_exception_bp_sp
private

◆ m_dynamic_type_map

DynamicTypeCache lldb_private::ItaniumABILanguageRuntime::m_dynamic_type_map
private

Definition at line 103 of file ItaniumABILanguageRuntime.h.

Referenced by GetDynamicTypeInfo(), and SetDynamicTypeInfo().

◆ m_mutex

std::mutex lldb_private::ItaniumABILanguageRuntime::m_mutex
private

◆ m_vtable_info_map

VTableInfoCache lldb_private::ItaniumABILanguageRuntime::m_vtable_info_map
private

Definition at line 104 of file ItaniumABILanguageRuntime.h.

Referenced by GetVTableInfo().


The documentation for this class was generated from the following files: