LLDB  mainline
Enumerations | Functions
LibCxx.cpp File Reference
#include "LibCxx.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/FormatEntity.h"
#include "lldb/Core/ValueObject.h"
#include "lldb/Core/ValueObjectConstResult.h"
#include "lldb/DataFormatters/FormattersHelpers.h"
#include "lldb/DataFormatters/StringPrinter.h"
#include "lldb/DataFormatters/TypeSummary.h"
#include "lldb/DataFormatters/VectorIterator.h"
#include "lldb/Target/ProcessStructReader.h"
#include "lldb/Target/SectionLoadList.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/DataBufferHeap.h"
#include "lldb/Utility/Endian.h"
#include "lldb/Utility/Status.h"
#include "lldb/Utility/Stream.h"
#include "Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h"
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
Include dependency graph for LibCxx.cpp:

Go to the source code of this file.

Enumerations

enum  LibcxxStringLayoutMode { eLibcxxStringLayoutModeCSD = 0, eLibcxxStringLayoutModeDSC = 1, eLibcxxStringLayoutModeInvalid = 0xffff }
 

Functions

static llvm::Optional< std::pair< uint64_t, ValueObjectSP > > ExtractLibcxxStringInfo (ValueObject &valobj)
 Determine the size in bytes of valobj (a libc++ std::string object) and extract its data payload. More...
 
template<StringPrinter::StringElementType element_type>
bool LibcxxStringSummaryProvider (ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options, std::string prefix_token)
 
template<StringPrinter::StringElementType element_type>
static bool formatStringImpl (ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options, std::string prefix_token)
 

Enumeration Type Documentation

◆ LibcxxStringLayoutMode

Enumerator
eLibcxxStringLayoutModeCSD 
eLibcxxStringLayoutModeDSC 
eLibcxxStringLayoutModeInvalid 

Definition at line 563 of file LibCxx.cpp.

Function Documentation

◆ ExtractLibcxxStringInfo()

static llvm::Optional<std::pair<uint64_t, ValueObjectSP> > ExtractLibcxxStringInfo ( ValueObject valobj)
static

Determine the size in bytes of valobj (a libc++ std::string object) and extract its data payload.

Return the size + payload pair.

Definition at line 572 of file LibCxx.cpp.

References eLibcxxStringLayoutModeCSD, eLibcxxStringLayoutModeDSC, lldb_private::ValueObject::GetChildAtIndexPath(), and LLDB_INVALID_OFFSET.

Referenced by LibcxxStringSummaryProvider(), and lldb_private::formatters::LibcxxWStringSummaryProvider().

◆ formatStringImpl()

template<StringPrinter::StringElementType element_type>
static bool formatStringImpl ( ValueObject valobj,
Stream stream,
const TypeSummaryOptions summary_options,
std::string  prefix_token 
)
static

Definition at line 779 of file LibCxx.cpp.

◆ LibcxxStringSummaryProvider()

template<StringPrinter::StringElementType element_type>
bool LibcxxStringSummaryProvider ( ValueObject valobj,
Stream stream,
const TypeSummaryOptions summary_options,
std::string  prefix_token 
)