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/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 <optional>
#include <tuple>

Go to the source code of this file.

Functions

static std::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.
 
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)
 
static bool LibcxxChronoTimePointSecondsSummaryProvider (ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options, const char *fmt)
 
static bool LibcxxChronoTimepointDaysSummaryProvider (ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options, const char *fmt)
 

Function Documentation

◆ ExtractLibcxxStringInfo()

static std::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 414 of file LibCxx.cpp.

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

References LibcxxExtractStringViewData().

◆ LibcxxChronoTimepointDaysSummaryProvider()

static bool LibcxxChronoTimepointDaysSummaryProvider ( ValueObject valobj,
Stream stream,
const TypeSummaryOptions options,
const char *  fmt 
)
static

◆ LibcxxChronoTimePointSecondsSummaryProvider()

static bool LibcxxChronoTimePointSecondsSummaryProvider ( ValueObject valobj,
Stream stream,
const TypeSummaryOptions options,
const char *  fmt 
)
static

◆ 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 627 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