LLDB mainline
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
lldb_private::ItaniumABILanguageRuntime Class Reference

#include <ItaniumABILanguageRuntime.h>

Inheritance diagram for lldb_private::ItaniumABILanguageRuntime:
Inheritance graph
[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) override
 
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)
 
bool isA (const void *ClassID) const override
 
lldb::LanguageType GetLanguageType () const override
 
bool GetObjectDescription (Stream &str, ValueObject &object) override
 
bool 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.
 
- Public Member Functions inherited from lldb_private::LanguageRuntime
virtual lldb::LanguageType GetLanguageType () const =0
 
virtual LanguageRuntimeGetPreferredLanguageRuntime (ValueObject &in_value)
 Return the preferred language runtime instance, which in most cases will be the current instance.
 
virtual bool GetObjectDescription (Stream &str, ValueObject &object)=0
 
virtual bool GetObjectDescription (Stream &str, Value &value, ExecutionContextScope *exe_scope)=0
 
virtual llvm::Expected< VTableInfoGetVTableInfo (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 DeclVendorGetDeclVendor ()
 
virtual lldb::BreakpointResolverSP CreateExceptionResolver (const lldb::BreakpointSP &bkpt, bool catch_bp, bool throw_bp)=0
 
virtual lldb::SearchFilterSP CreateExceptionSearchFilter ()
 
virtual bool GetTypeBitSize (const CompilerType &compiler_type, uint64_t &size)
 
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< 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 bool isA (const void *ClassID) const
 
- 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 ()
 
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
 
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

Definition at line 95 of file ItaniumABILanguageRuntime.h.

◆ VTableInfoCache

Definition at line 96 of file ItaniumABILanguageRuntime.h.

Constructor & Destructor Documentation

◆ ~ItaniumABILanguageRuntime()

lldb_private::ItaniumABILanguageRuntime::~ItaniumABILanguageRuntime ( )
overridedefault

◆ ItaniumABILanguageRuntime()

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

Definition at line 98 of file ItaniumABILanguageRuntime.h.

Member Function Documentation

◆ classof()

static 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

Implements lldb_private::LanguageRuntime.

Definition at line 50 of file ItaniumABILanguageRuntime.cpp.

Referenced by GetDynamicTypeAndAddress().

◆ 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()

lldb::SearchFilterSP ItaniumABILanguageRuntime::CreateExceptionSearchFilter ( )
overridevirtual

◆ CreateInstance()

LanguageRuntime * ItaniumABILanguageRuntime::CreateInstance ( Process process,
lldb::LanguageType  language 
)
static

◆ ExceptionBreakpointsAreSet()

bool ItaniumABILanguageRuntime::ExceptionBreakpointsAreSet ( )
overridevirtual

Reimplemented from lldb_private::LanguageRuntime.

Definition at line 603 of file ItaniumABILanguageRuntime.cpp.

References m_cxx_exception_bp_sp.

◆ ExceptionBreakpointsExplainStop()

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

◆ FixUpDynamicType()

TypeAndOrName ItaniumABILanguageRuntime::FixUpDynamicType ( const TypeAndOrName type_and_or_name,
ValueObject static_value 
)
overridevirtual

◆ GetDynamicTypeAndAddress()

bool ItaniumABILanguageRuntime::GetDynamicTypeAndAddress ( ValueObject in_value,
lldb::DynamicValueType  use_dynamic,
TypeAndOrName class_type_or_name,
Address address,
Value::ValueType value_type 
)
overridevirtual

◆ GetDynamicTypeInfo()

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

Definition at line 692 of file ItaniumABILanguageRuntime.cpp.

References m_dynamic_type_map, and m_mutex.

Referenced by GetTypeInfo().

◆ GetExceptionObjectForThread()

ValueObjectSP ItaniumABILanguageRuntime::GetExceptionObjectForThread ( lldb::ThreadSP  thread_sp)
overridevirtual

◆ GetPluginName()

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

Implements lldb_private::PluginInterface.

Definition at line 83 of file ItaniumABILanguageRuntime.h.

References GetPluginNameStatic().

◆ GetPluginNameStatic()

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

Definition at line 38 of file ItaniumABILanguageRuntime.h.

Referenced by GetPluginName(), and Initialize().

◆ GetTypeInfo()

TypeAndOrName ItaniumABILanguageRuntime::GetTypeInfo ( ValueObject in_value,
const VTableInfo vtable_info 
)
private

◆ 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 218 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 702 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()

llvm::Error ItaniumABILanguageRuntime::TypeHasVTable ( CompilerType  compiler_type)
private

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: