LLDB  mainline
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
lldb_private::LanguageRuntime Class Referenceabstract

#include <LanguageRuntime.h>

Inheritance diagram for lldb_private::LanguageRuntime:
Inheritance graph
Collaboration diagram for lldb_private::LanguageRuntime:
Collaboration graph

Public Member Functions

virtual lldb::LanguageType GetLanguageType () const =0
virtual bool GetObjectDescription (Stream &str, ValueObject &object)=0
virtual bool GetObjectDescription (Stream &str, Value &value, ExecutionContextScope *exe_scope)=0
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. More...
virtual llvm::Optional< CompilerTypeGetRuntimeType (CompilerType base_type)
virtual void ModulesDidLoad (const ModuleList &module_list) override
 Called when modules have been loaded in the process. More...
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 ()
- Public Member Functions inherited from lldb_private::PluginInterface
 PluginInterface ()=default
virtual ~PluginInterface ()=default
virtual ConstString GetPluginName ()=0
virtual uint32_t GetPluginVersion ()=0
 PluginInterface (const PluginInterface &)=delete
PluginInterfaceoperator= (const PluginInterface &)=delete

Static Public Member Functions

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. More...

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

Detailed Description

Definition at line 60 of file LanguageRuntime.h.

Constructor & Destructor Documentation

◆ LanguageRuntime()

LanguageRuntime::LanguageRuntime ( Process process)

Definition at line 217 of file LanguageRuntime.cpp.

Member Function Documentation

◆ ClearExceptionBreakpoints()

virtual void lldb_private::LanguageRuntime::ClearExceptionBreakpoints ( )

◆ CouldHaveDynamicValue()

virtual bool lldb_private::LanguageRuntime::CouldHaveDynamicValue ( ValueObject in_value)
pure virtual

◆ CreateExceptionBreakpoint()

BreakpointSP LanguageRuntime::CreateExceptionBreakpoint ( Target target,
lldb::LanguageType  language,
bool  catch_bp,
bool  throw_bp,
bool  is_internal = false 

◆ CreateExceptionResolver()

virtual lldb::BreakpointResolverSP lldb_private::LanguageRuntime::CreateExceptionResolver ( const lldb::BreakpointSP &  bkpt,
bool  catch_bp,
bool  throw_bp 
pure virtual

◆ CreateExceptionSearchFilter()

virtual lldb::SearchFilterSP lldb_private::LanguageRuntime::CreateExceptionSearchFilter ( )

◆ ExceptionBreakpointsAreSet()

virtual bool lldb_private::LanguageRuntime::ExceptionBreakpointsAreSet ( )

◆ ExceptionBreakpointsExplainStop()

virtual bool lldb_private::LanguageRuntime::ExceptionBreakpointsExplainStop ( lldb::StopInfoSP  stop_reason)

◆ FindPlugin()

LanguageRuntime * LanguageRuntime::FindPlugin ( Process process,
lldb::LanguageType  language 

◆ FixUpDynamicType()

virtual TypeAndOrName lldb_private::LanguageRuntime::FixUpDynamicType ( const TypeAndOrName type_and_or_name,
ValueObject static_value 
pure virtual

◆ GetBacktraceThreadFromException()

virtual lldb::ThreadSP lldb_private::LanguageRuntime::GetBacktraceThreadFromException ( lldb::ValueObjectSP  thread_sp)

Reimplemented in lldb_private::AppleObjCRuntime.

Definition at line 124 of file LanguageRuntime.h.

◆ GetConcreteType()

virtual CompilerType lldb_private::LanguageRuntime::GetConcreteType ( ExecutionContextScope exe_scope,
ConstString  abstract_type_name 

Definition at line 84 of file LanguageRuntime.h.

◆ GetDeclVendor()

virtual DeclVendor* lldb_private::LanguageRuntime::GetDeclVendor ( )

◆ GetDynamicTypeAndAddress()

virtual bool lldb_private::LanguageRuntime::GetDynamicTypeAndAddress ( ValueObject in_value,
lldb::DynamicValueType  use_dynamic,
TypeAndOrName class_type_or_name,
Address address,
Value::ValueType value_type 
pure virtual

◆ GetExceptionObjectForThread()

virtual lldb::ValueObjectSP lldb_private::LanguageRuntime::GetExceptionObjectForThread ( lldb::ThreadSP  thread_sp)

◆ GetExceptionPrecondition()

BreakpointPreconditionSP LanguageRuntime::GetExceptionPrecondition ( lldb::LanguageType  language,
bool  throw_bp 

◆ GetIRPasses()

virtual bool lldb_private::LanguageRuntime::GetIRPasses ( LLVMUserExpression::IRPasses custom_passes)

Reimplemented in lldb_private::RenderScriptRuntime.

Definition at line 162 of file LanguageRuntime.h.

◆ GetLanguageType()

virtual lldb::LanguageType lldb_private::LanguageRuntime::GetLanguageType ( ) const
pure virtual

◆ GetObjectDescription() [1/2]

virtual bool lldb_private::LanguageRuntime::GetObjectDescription ( Stream str,
Value value,
ExecutionContextScope exe_scope 
pure virtual

◆ GetObjectDescription() [2/2]

virtual bool lldb_private::LanguageRuntime::GetObjectDescription ( Stream str,
ValueObject object 
pure virtual

◆ GetRuntimeType()

virtual llvm::Optional<CompilerType> lldb_private::LanguageRuntime::GetRuntimeType ( CompilerType  base_type)

Reimplemented in lldb_private::ObjCLanguageRuntime.

Definition at line 153 of file LanguageRuntime.h.

◆ GetRuntimeUnwindPlan() [1/2]

virtual lldb::UnwindPlanSP lldb_private::LanguageRuntime::GetRuntimeUnwindPlan ( lldb::ProcessSP  process_sp,
lldb_private::RegisterContext regctx,
bool &  behaves_like_zeroth_frame 

Definition at line 215 of file LanguageRuntime.h.

◆ GetRuntimeUnwindPlan() [2/2]

UnwindPlanSP LanguageRuntime::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.

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]threadThe thread that the unwind is happening on.
[in]regctxThe 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_frameWith 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.
Returns an UnwindPlan to find the caller frame if it should be used, instead of the UnwindPlan that would normally be used for this function.

Definition at line 263 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().

◆ GetStepThroughTrampolinePlan()

virtual lldb::ThreadPlanSP lldb_private::LanguageRuntime::GetStepThroughTrampolinePlan ( Thread thread,
bool  stop_others 
pure virtual

◆ GetTypeBitSize()

virtual bool lldb_private::LanguageRuntime::GetTypeBitSize ( const CompilerType compiler_type,
uint64_t &  size 

Reimplemented in lldb_private::ObjCLanguageRuntime.

Definition at line 139 of file LanguageRuntime.h.

◆ InitializeCommands()

void LanguageRuntime::InitializeCommands ( CommandObject parent)

◆ isA()

virtual bool lldb_private::LanguageRuntime::isA ( const void *  ClassID) const

◆ IsAllowedRuntimeValue()

virtual bool lldb_private::LanguageRuntime::IsAllowedRuntimeValue ( ConstString  name)

Identify whether a name is a runtime value that should not be hidden by from the user interface.

Reimplemented in lldb_private::ObjCLanguageRuntime, and lldb_private::CPPLanguageRuntime.

Definition at line 151 of file LanguageRuntime.h.

◆ LookupRuntimeSymbol()

virtual lldb::addr_t lldb_private::LanguageRuntime::LookupRuntimeSymbol ( ConstString  name)

◆ ModulesDidLoad()

virtual void lldb_private::LanguageRuntime::ModulesDidLoad ( const ModuleList module_list)

Called when modules have been loaded in the process.

Implements lldb_private::Runtime.

Reimplemented in lldb_private::RenderScriptRuntime, and lldb_private::AppleObjCRuntime.

Definition at line 157 of file LanguageRuntime.h.

◆ SetExceptionBreakpoints()

virtual void lldb_private::LanguageRuntime::SetExceptionBreakpoints ( )

◆ SymbolsDidLoad()

virtual void lldb_private::LanguageRuntime::SymbolsDidLoad ( const ModuleList module_list)

Reimplemented in lldb_private::ObjCLanguageRuntime.

Definition at line 144 of file LanguageRuntime.h.

Member Data Documentation

◆ ID

char LanguageRuntime::ID = 0

Definition at line 174 of file LanguageRuntime.h.

Referenced by isA().

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