LLDB mainline
lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd Class Reference
Inheritance diagram for lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd:
[legend]

Public Member Functions

 LibcxxStdUnorderedMapSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp)
 ~LibcxxStdUnorderedMapSyntheticFrontEnd () override=default
llvm::Expected< uint32_t > CalculateNumChildren () override
lldb::ValueObjectSP GetChildAtIndex (uint32_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).
llvm::Expected< size_t > GetIndexOfChildWithName (ConstString name) override
Public Member Functions inherited from lldb_private::SyntheticChildrenFrontEnd
 SyntheticChildrenFrontEnd (ValueObject &backend)
virtual ~SyntheticChildrenFrontEnd ()=default
virtual llvm::Expected< uint32_t > CalculateNumChildren (uint32_t max)
uint32_t CalculateNumChildrenIgnoringErrors (uint32_t max=UINT32_MAX)
virtual bool MightHaveChildren ()
virtual lldb::ValueObjectSP GetSyntheticValue ()
virtual ConstString GetSyntheticTypeName ()

Private Member Functions

CompilerType GetNodeType ()
CompilerType GetElementType (CompilerType table_type)
llvm::Expected< size_t > CalculateNumChildrenImpl (ValueObject &table)

Private Attributes

CompilerType m_element_type
CompilerType m_node_type
ValueObjectm_tree = nullptr
size_t m_num_elements = 0
ValueObjectm_next_element = nullptr
std::vector< std::pair< ValueObject *, uint64_t > > m_elements_cache

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, bool do_deref=true)
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

Definition at line 30 of file LibCxxUnorderedMap.cpp.

Constructor & Destructor Documentation

◆ LibcxxStdUnorderedMapSyntheticFrontEnd()

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

◆ ~LibcxxStdUnorderedMapSyntheticFrontEnd()

lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::~LibcxxStdUnorderedMapSyntheticFrontEnd ( )
overridedefault

Member Function Documentation

◆ CalculateNumChildren()

llvm::Expected< uint32_t > lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::CalculateNumChildren ( )
overridevirtual

Implements lldb_private::SyntheticChildrenFrontEnd.

Definition at line 90 of file LibCxxUnorderedMap.cpp.

References m_num_elements.

◆ CalculateNumChildrenImpl()

llvm::Expected< size_t > lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::CalculateNumChildrenImpl ( ValueObject & table)
private

◆ GetChildAtIndex()

◆ GetElementType()

◆ GetIndexOfChildWithName()

llvm::Expected< size_t > lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::GetIndexOfChildWithName ( ConstString name)
overridevirtual

◆ GetNodeType()

CompilerType lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::GetNodeType ( )
private

◆ Update()

lldb::ChildCacheState lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::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 "ValueObjectSynthetic cache is good/bad". If this function returns lldb::ChildCacheState::eReuse, ValueObjectSynthetic is allowed to use the children it fetched previously and cached. Otherwise, ValueObjectSynthetic must throw away its cache, and query again for children.

Implements lldb_private::SyntheticChildrenFrontEnd.

Definition at line 253 of file LibCxxUnorderedMap.cpp.

References CalculateNumChildrenImpl(), lldb_private::DataFormatters, lldb::eRefetch, GetElementType(), lldb_private::GetLog(), GetNodeType(), GetTreePointer(), LLDB_LOG_ERRORV, lldb_private::SyntheticChildrenFrontEnd::m_backend, m_element_type, m_elements_cache, m_next_element, m_node_type, m_num_elements, and m_tree.

Referenced by LibcxxStdUnorderedMapSyntheticFrontEnd().

Member Data Documentation

◆ m_element_type

CompilerType lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::m_element_type
private

◆ m_elements_cache

std::vector<std::pair<ValueObject *, uint64_t> > lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::m_elements_cache
private

◆ m_next_element

ValueObject* lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::m_next_element = nullptr
private

Definition at line 54 of file LibCxxUnorderedMap.cpp.

Referenced by GetChildAtIndex(), and Update().

◆ m_node_type

CompilerType lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::m_node_type
private

Definition at line 51 of file LibCxxUnorderedMap.cpp.

Referenced by GetChildAtIndex(), and Update().

◆ m_num_elements

size_t lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::m_num_elements = 0
private

Definition at line 53 of file LibCxxUnorderedMap.cpp.

Referenced by CalculateNumChildren(), and Update().

◆ m_tree

ValueObject* lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::m_tree = nullptr
private

Definition at line 52 of file LibCxxUnorderedMap.cpp.

Referenced by GetChildAtIndex(), and Update().


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