LLDB mainline
Public Member Functions | Private Attributes | List of all members
lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd Class Reference

Synthetic children frontend for std::coroutine_handle<promise_type> from libc++, libstdc++ and MSVC STL. More...

#include <Coroutines.h>

Inheritance diagram for lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd:
Inheritance graph
[legend]

Public Member Functions

 StdlibCoroutineHandleSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp)
 
 ~StdlibCoroutineHandleSyntheticFrontEnd () override
 
size_t CalculateNumChildren () override
 
lldb::ValueObjectSP GetChildAtIndex (size_t idx) override
 
lldb::ChildCacheState Update () override
 This function is assumed to always succeed and if it fails, the front-end should know to deal with it in the correct way (most probably, by refusing to return any children).
 
bool MightHaveChildren () override
 
size_t GetIndexOfChildWithName (ConstString name) override
 
- Public Member Functions inherited from lldb_private::SyntheticChildrenFrontEnd
 SyntheticChildrenFrontEnd (ValueObject &backend)
 
virtual ~SyntheticChildrenFrontEnd ()=default
 
virtual size_t CalculateNumChildren ()=0
 
virtual size_t CalculateNumChildren (uint32_t max)
 
virtual lldb::ValueObjectSP GetChildAtIndex (size_t idx)=0
 
virtual size_t GetIndexOfChildWithName (ConstString name)=0
 
virtual lldb::ChildCacheState Update ()=0
 This function is assumed to always succeed and if it fails, the front-end should know to deal with it in the correct way (most probably, by refusing to return any children).
 
virtual bool MightHaveChildren ()=0
 
virtual lldb::ValueObjectSP GetSyntheticValue ()
 
virtual ConstString GetSyntheticTypeName ()
 

Private Attributes

lldb::ValueObjectSP m_resume_ptr_sp
 
lldb::ValueObjectSP m_destroy_ptr_sp
 
lldb::ValueObjectSP m_promise_ptr_sp
 

Additional Inherited Members

- Public Types inherited from lldb_private::SyntheticChildrenFrontEnd
typedef std::shared_ptr< SyntheticChildrenFrontEndSharedPointer
 
typedef std::unique_ptr< SyntheticChildrenFrontEndAutoPointer
 
- Protected Member Functions inherited from lldb_private::SyntheticChildrenFrontEnd
void SetValid (bool valid)
 
bool IsValid ()
 
lldb::ValueObjectSP CreateValueObjectFromExpression (llvm::StringRef name, llvm::StringRef expression, const ExecutionContext &exe_ctx)
 
lldb::ValueObjectSP CreateValueObjectFromAddress (llvm::StringRef name, uint64_t address, const ExecutionContext &exe_ctx, CompilerType type)
 
lldb::ValueObjectSP CreateValueObjectFromData (llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type)
 
- Protected Attributes inherited from lldb_private::SyntheticChildrenFrontEnd
ValueObjectm_backend
 

Detailed Description

Synthetic children frontend for std::coroutine_handle<promise_type> from libc++, libstdc++ and MSVC STL.

Shows the compiler-generated resume and destroy function pointers as well as the promise, if the promise type is promise_type != void.

Definition at line 30 of file Coroutines.h.

Constructor & Destructor Documentation

◆ StdlibCoroutineHandleSyntheticFrontEnd()

lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd::StdlibCoroutineHandleSyntheticFrontEnd ( lldb::ValueObjectSP  valobj_sp)

Definition at line 97 of file Coroutines.cpp.

References Update().

◆ ~StdlibCoroutineHandleSyntheticFrontEnd()

lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd::~StdlibCoroutineHandleSyntheticFrontEnd ( )
overridedefault

Member Function Documentation

◆ CalculateNumChildren()

size_t lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd::CalculateNumChildren ( )
overridevirtual

Implements lldb_private::SyntheticChildrenFrontEnd.

Definition at line 107 of file Coroutines.cpp.

◆ GetChildAtIndex()

lldb::ValueObjectSP lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd::GetChildAtIndex ( size_t  idx)
overridevirtual

Implements lldb_private::SyntheticChildrenFrontEnd.

Definition at line 115 of file Coroutines.cpp.

◆ GetIndexOfChildWithName()

size_t StdlibCoroutineHandleSyntheticFrontEnd::GetIndexOfChildWithName ( ConstString  name)
overridevirtual

◆ MightHaveChildren()

bool lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd::MightHaveChildren ( )
overridevirtual

Implements lldb_private::SyntheticChildrenFrontEnd.

Definition at line 200 of file Coroutines.cpp.

◆ Update()

lldb::ChildCacheState lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd::Update ( )
overridevirtual

This function is assumed to always succeed and if it fails, the front-end should know to deal with it in the correct way (most probably, by refusing to return any children).

The return value of Update should actually be interpreted as "ValueObjectSyntheticFilter cache is good/bad". If this function returns lldb::ChildCacheState::eReuse, ValueObjectSyntheticFilter is allowed to use the children it fetched previously and cached. Otherwise, ValueObjectSyntheticFilter must throw away its cache, and query again for children.

Implements lldb_private::SyntheticChildrenFrontEnd.

Definition at line 129 of file Coroutines.cpp.

References lldb::eBasicTypeVoid, lldb::eRefetch, error(), ExtractDestroyFunction(), GetCoroFramePtrFromHandle(), lldb_private::CompilerType::GetPointerType(), InferPromiseType(), lldb_private::CompilerType::IsVoidType(), LLDB_INVALID_ADDRESS, and lldbassert.

Referenced by StdlibCoroutineHandleSyntheticFrontEnd().

Member Data Documentation

◆ m_destroy_ptr_sp

lldb::ValueObjectSP lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd::m_destroy_ptr_sp
private

Definition at line 49 of file Coroutines.h.

Referenced by GetIndexOfChildWithName().

◆ m_promise_ptr_sp

lldb::ValueObjectSP lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd::m_promise_ptr_sp
private

Definition at line 50 of file Coroutines.h.

Referenced by GetIndexOfChildWithName().

◆ m_resume_ptr_sp

lldb::ValueObjectSP lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd::m_resume_ptr_sp
private

Definition at line 48 of file Coroutines.h.

Referenced by GetIndexOfChildWithName().


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