LLDB  mainline
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/ConstString.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 "lldb/lldb-enumerations.h"
#include <tuple>
Include dependency graph for LibCxx.cpp:

Go to the source code of this file.

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...
 
static bool LibcxxWStringSummaryProvider (ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options, ValueObjectSP location_sp, size_t size)
 
template<StringPrinter::StringElementType element_type>
static bool LibcxxStringSummaryProvider (ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options, std::string prefix_token, ValueObjectSP location_sp, uint64_t size)
 
template<StringPrinter::StringElementType element_type>
static 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)
 
static std::tuple< bool, ValueObjectSP, size_t > LibcxxExtractStringViewData (ValueObject &valobj)
 
template<StringPrinter::StringElementType element_type>
static bool formatStringViewImpl (ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options, std::string prefix_token)
 

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 733 of file LibCxx.cpp.

References lldb_private::ExecutionContext::GetBestExecutionContextScope(), lldb_private::ValueObject::GetChildMemberWithName(), 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 967 of file LibCxx.cpp.

References lldb_private::StreamString::GetData().

◆ formatStringViewImpl()

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

Definition at line 1022 of file LibCxx.cpp.

References LibcxxExtractStringViewData().

◆ LibcxxExtractStringViewData()

static std::tuple<bool, ValueObjectSP, size_t> LibcxxExtractStringViewData ( ValueObject valobj)
static

◆ LibcxxStringSummaryProvider() [1/2]

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

Definition at line 953 of file LibCxx.cpp.

References ExtractLibcxxStringInfo().

◆ LibcxxStringSummaryProvider() [2/2]

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

◆ LibcxxWStringSummaryProvider()

static bool LibcxxWStringSummaryProvider ( ValueObject valobj,
Stream stream,
const TypeSummaryOptions summary_options,
ValueObjectSP  location_sp,
size_t  size 
)
static