LLDB mainline
|
#include <ValueObjectPrinter.h>
Public Member Functions | |
ValueObjectPrinter (ValueObject *valobj, Stream *s) | |
ValueObjectPrinter (ValueObject *valobj, Stream *s, const DumpValueObjectOptions &options) | |
~ValueObjectPrinter ()=default | |
bool | PrintValueObject () |
Protected Types | |
typedef std::set< uint64_t > | InstancePointersSet |
typedef std::shared_ptr< InstancePointersSet > | InstancePointersSetSP |
Protected Member Functions | |
ValueObjectPrinter (ValueObject *valobj, Stream *s, const DumpValueObjectOptions &options, const DumpValueObjectOptions::PointerDepth &ptr_depth, uint32_t curr_depth, InstancePointersSetSP printed_instance_pointers) | |
void | Init (ValueObject *valobj, Stream *s, const DumpValueObjectOptions &options, const DumpValueObjectOptions::PointerDepth &ptr_depth, uint32_t curr_depth, InstancePointersSetSP printed_instance_pointers) |
bool | GetMostSpecializedValue () |
const char * | GetDescriptionForDisplay () |
const char * | GetRootNameForDisplay () |
bool | ShouldPrintValueObject () |
bool | IsNil () |
bool | IsUninitialized () |
bool | IsPtr () |
bool | IsRef () |
bool | IsInstancePointer () |
bool | IsAggregate () |
bool | PrintLocationIfNeeded () |
void | PrintDecl () |
bool | CheckScopeIfNeeded () |
bool | ShouldPrintEmptyBrackets (bool value_printed, bool summary_printed) |
TypeSummaryImpl * | GetSummaryFormatter (bool null_if_omitted=true) |
void | GetValueSummaryError (std::string &value, std::string &summary, std::string &error) |
bool | PrintValueAndSummaryIfNeeded (bool &value_printed, bool &summary_printed) |
bool | PrintObjectDescriptionIfNeeded (bool value_printed, bool summary_printed) |
bool | ShouldPrintChildren (bool is_failed_description, DumpValueObjectOptions::PointerDepth &curr_ptr_depth) |
bool | ShouldExpandEmptyAggregates () |
ValueObject * | GetValueObjectForChildrenGeneration () |
void | PrintChildrenPreamble (bool value_printed, bool summary_printed) |
void | PrintChildrenPostamble (bool print_dotdotdot) |
lldb::ValueObjectSP | GenerateChild (ValueObject *synth_valobj, size_t idx) |
void | PrintChild (lldb::ValueObjectSP child_sp, const DumpValueObjectOptions::PointerDepth &curr_ptr_depth) |
uint32_t | GetMaxNumChildrenToPrint (bool &print_dotdotdot) |
void | PrintChildren (bool value_printed, bool summary_printed, const DumpValueObjectOptions::PointerDepth &curr_ptr_depth) |
void | PrintChildrenIfNeeded (bool value_printed, bool summary_printed) |
bool | PrintChildrenOneLiner (bool hide_names) |
bool | HasReachedMaximumDepth () |
Protected Attributes | |
InstancePointersSetSP | m_printed_instance_pointers |
Private Member Functions | |
bool | ShouldShowName () const |
ValueObjectPrinter (const ValueObjectPrinter &)=delete | |
const ValueObjectPrinter & | operator= (const ValueObjectPrinter &)=delete |
Private Attributes | |
ValueObject * | m_orig_valobj |
ValueObject * | m_valobj |
Stream * | m_stream |
DumpValueObjectOptions | m_options |
Flags | m_type_flags |
CompilerType | m_compiler_type |
DumpValueObjectOptions::PointerDepth | m_ptr_depth |
uint32_t | m_curr_depth |
LazyBool | m_should_print |
LazyBool | m_is_nil |
LazyBool | m_is_uninit |
LazyBool | m_is_ptr |
LazyBool | m_is_ref |
LazyBool | m_is_aggregate |
LazyBool | m_is_instance_ptr |
std::pair< TypeSummaryImpl *, bool > | m_summary_formatter |
std::string | m_value |
std::string | m_summary |
std::string | m_error |
bool | m_val_summary_ok |
Friends | |
struct | StringSummaryFormat |
Definition at line 23 of file ValueObjectPrinter.h.
|
protected |
Definition at line 35 of file ValueObjectPrinter.h.
|
protected |
Definition at line 36 of file ValueObjectPrinter.h.
ValueObjectPrinter::ValueObjectPrinter | ( | ValueObject * | valobj, |
Stream * | s | ||
) |
Definition at line 21 of file ValueObjectPrinter.cpp.
References Init(), lldb_private::DumpValueObjectOptions::m_max_ptr_depth, and m_options.
ValueObjectPrinter::ValueObjectPrinter | ( | ValueObject * | valobj, |
Stream * | s, | ||
const DumpValueObjectOptions & | options | ||
) |
Definition at line 31 of file ValueObjectPrinter.cpp.
References Init(), lldb_private::DumpValueObjectOptions::m_max_ptr_depth, and m_options.
|
default |
|
protected |
Definition at line 36 of file ValueObjectPrinter.cpp.
References Init().
|
privatedelete |
|
protected |
Definition at line 322 of file ValueObjectPrinter.cpp.
References lldb_private::ValueObject::IsInScope(), m_options, lldb_private::DumpValueObjectOptions::m_scope_already_checked, and m_valobj.
Referenced by PrintValueAndSummaryIfNeeded().
|
protected |
Definition at line 672 of file ValueObjectPrinter.cpp.
References lldb_private::ValueObject::GetChildAtIndex(), lldb_private::ValueObject::GetSyntheticArrayMember(), and PhysicalIndexForLogicalIndex().
|
protected |
Definition at line 157 of file ValueObjectPrinter.cpp.
References lldb_private::ValueObject::GetObjectDescription(), lldb_private::ValueObject::GetSummaryAsCString(), lldb_private::ValueObject::GetValueAsCString(), and m_valobj.
Referenced by PrintObjectDescriptionIfNeeded().
|
protected |
Definition at line 612 of file ValueObjectPrinter.cpp.
References lldb_private::ValueObject::GetNumChildren().
|
protected |
Definition at line 110 of file ValueObjectPrinter.cpp.
References lldb::eNoDynamicValues, lldb_private::ValueObject::GetCompilerType(), lldb_private::ValueObject::GetDynamicValue(), lldb_private::ValueObject::GetNonSyntheticValue(), lldb_private::ValueObject::GetStaticValue(), lldb_private::ValueObject::GetSyntheticValue(), lldb_private::CompilerType::GetTypeInfo(), lldb_private::ValueObject::IsDynamic(), lldb_private::ValueObject::IsSynthetic(), m_compiler_type, m_options, m_orig_valobj, m_type_flags, lldb_private::DumpValueObjectOptions::m_use_dynamic, lldb_private::DumpValueObjectOptions::m_use_synthetic, m_valobj, and lldb_private::ValueObject::UpdateValueIfNeeded().
Referenced by PrintValueObject().
|
protected |
Definition at line 166 of file ValueObjectPrinter.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::ValueObject::GetName(), m_options, lldb_private::DumpValueObjectOptions::m_root_valobj_name, and m_valobj.
Referenced by PrintDecl().
|
protected |
Definition at line 328 of file ValueObjectPrinter.cpp.
References lldb_private::ValueObject::GetSummaryFormat(), lldb_private::DumpValueObjectOptions::m_omit_summary_depth, m_options, m_summary_formatter, lldb_private::DumpValueObjectOptions::m_summary_sp, and m_valobj.
Referenced by GetValueSummaryError(), and PrintValueAndSummaryIfNeeded().
|
protected |
Definition at line 561 of file ValueObjectPrinter.cpp.
|
protected |
Definition at line 351 of file ValueObjectPrinter.cpp.
References lldb_private::Status::AsCString(), lldb::eFormatDefault, lldb::eLanguageTypeUnknown, error(), lldb_private::Language::FindPlugin(), lldb_private::ValueObject::GetError(), lldb_private::ValueObject::GetFormat(), lldb_private::ValueObject::GetPreferredDisplayLanguage(), lldb_private::ValueObject::GetSummaryAsCString(), GetSummaryFormatter(), lldb_private::ValueObject::GetValueAsCString(), IsNil(), IsUninitialized(), lldb_private::DumpValueObjectOptions::m_format, lldb_private::DumpValueObjectOptions::m_omit_summary_depth, m_options, lldb_private::DumpValueObjectOptions::m_pointer_as_array, m_valobj, lldb_private::DumpValueObjectOptions::m_varformat_language, and ShouldPrintValueObject().
Referenced by PrintValueAndSummaryIfNeeded().
|
protected |
Definition at line 828 of file ValueObjectPrinter.cpp.
|
protected |
Definition at line 43 of file ValueObjectPrinter.cpp.
References lldb_private::eLazyBoolCalculate, m_curr_depth, m_error, m_is_aggregate, m_is_instance_ptr, m_is_nil, m_is_ptr, m_is_ref, m_is_uninit, m_options, m_orig_valobj, m_printed_instance_pointers, m_ptr_depth, m_should_print, m_stream, m_summary, m_summary_formatter, m_val_summary_ok, m_valobj, and m_value.
Referenced by ValueObjectPrinter().
|
protected |
Definition at line 207 of file ValueObjectPrinter.cpp.
References lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, m_is_aggregate, m_type_flags, and lldb_private::Flags::Test().
|
protected |
Definition at line 214 of file ValueObjectPrinter.cpp.
References lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::Value::GetCompilerType(), lldb_private::CompilerType::GetTypeInfo(), lldb_private::ValueObject::GetValue(), lldb_private::ValueObject::IsBaseClass(), m_is_instance_ptr, and m_valobj.
|
protected |
Definition at line 182 of file ValueObjectPrinter.cpp.
References lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::ValueObject::IsNilReference(), m_is_nil, and m_valobj.
Referenced by GetValueSummaryError(), PrintObjectDescriptionIfNeeded(), and PrintValueAndSummaryIfNeeded().
|
protected |
Definition at line 195 of file ValueObjectPrinter.cpp.
References lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, m_is_ptr, m_type_flags, and lldb_private::Flags::Test().
|
protected |
Definition at line 201 of file ValueObjectPrinter.cpp.
References lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, m_is_ref, m_type_flags, and lldb_private::Flags::Test().
|
protected |
Definition at line 188 of file ValueObjectPrinter.cpp.
References lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::ValueObject::IsUninitializedReference(), m_is_uninit, and m_valobj.
Referenced by GetValueSummaryError(), PrintObjectDescriptionIfNeeded(), and PrintValueAndSummaryIfNeeded().
|
privatedelete |
|
protected |
Definition at line 583 of file ValueObjectPrinter.cpp.
References lldb_private::DumpValueObjectOptions::m_omit_summary_depth, PrintValueObject(), lldb_private::DumpValueObjectOptions::SetElementCount(), lldb_private::DumpValueObjectOptions::SetFormat(), lldb_private::DumpValueObjectOptions::SetHideName(), lldb_private::DumpValueObjectOptions::SetHideValue(), lldb_private::DumpValueObjectOptions::SetOmitSummaryDepth(), lldb_private::DumpValueObjectOptions::SetRootValueObjectName(), lldb_private::DumpValueObjectOptions::SetScopeChecked(), and lldb_private::DumpValueObjectOptions::SetSummary().
|
protected |
Definition at line 687 of file ValueObjectPrinter.cpp.
|
protected |
Definition at line 777 of file ValueObjectPrinter.cpp.
References lldb_private::DumpValueObjectOptions::PointerDepth::CanAllowExpansion(), and lldb_private::DataVisualization::ShouldPrintAsOneLiner().
Referenced by PrintValueObject().
|
protected |
Definition at line 735 of file ValueObjectPrinter.cpp.
References lldb_private::ValueObject::eDisable, lldb_private::ValueObject::eValueObjectRepresentationStyleSummary, and lldb_private::ValueObject::GetChildAtIndex().
Referenced by lldb_private::StringSummaryFormat::FormatObject().
|
protected |
Definition at line 632 of file ValueObjectPrinter.cpp.
|
protected |
Definition at line 565 of file ValueObjectPrinter.cpp.
|
protected |
Definition at line 234 of file ValueObjectPrinter.cpp.
References lldb::eLanguageTypeUnknown, lldb_private::StreamString::Empty(), lldb_private::Language::FindPlugin(), lldb_private::ConstString::GetCString(), lldb_private::StreamString::GetData(), lldb_private::ValueObject::GetDisplayTypeName(), lldb_private::ValueObject::GetExpressionPath(), lldb_private::ValueObject::GetPreferredDisplayLanguage(), lldb_private::ValueObject::GetQualifiedTypeName(), GetRootNameForDisplay(), lldb_private::StreamString::GetString(), lldb_private::CompilerType::IsValid(), m_compiler_type, m_curr_depth, lldb_private::DumpValueObjectOptions::m_decl_printing_helper, lldb_private::DumpValueObjectOptions::m_flat_output, lldb_private::DumpValueObjectOptions::m_hide_pointer_value, lldb_private::DumpValueObjectOptions::m_hide_root_type, m_options, lldb_private::DumpValueObjectOptions::m_show_types, m_stream, lldb_private::DumpValueObjectOptions::m_use_type_display_name, m_valobj, lldb_private::DumpValueObjectOptions::m_varformat_language, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and ShouldShowName().
Referenced by PrintValueObject().
|
protected |
Definition at line 226 of file ValueObjectPrinter.cpp.
References lldb_private::ValueObject::GetLocationAsCString(), m_options, lldb_private::DumpValueObjectOptions::m_show_location, m_stream, m_valobj, and lldb_private::Stream::Printf().
Referenced by PrintValueObject().
|
protected |
Definition at line 458 of file ValueObjectPrinter.cpp.
References GetDescriptionForDisplay(), lldb_private::ValueObject::GetObjectDescription(), IsNil(), IsUninitialized(), lldb_private::DumpValueObjectOptions::m_hide_value, m_options, lldb_private::DumpValueObjectOptions::m_pointer_as_array, m_stream, lldb_private::DumpValueObjectOptions::m_use_objc, m_valobj, lldb_private::Stream::Printf(), ShouldPrintValueObject(), and ShouldShowName().
|
protected |
Definition at line 401 of file ValueObjectPrinter.cpp.
References CheckScopeIfNeeded(), lldb_private::TypeSummaryImpl::DoesPrintValue(), lldb::eFormatDefault, lldb_private::ValueObject::GetCompilerType(), GetSummaryFormatter(), GetValueSummaryError(), IsNil(), IsPointerValue(), IsUninitialized(), lldb_private::CompilerType::IsValid(), m_compiler_type, m_error, lldb_private::DumpValueObjectOptions::m_format, lldb_private::DumpValueObjectOptions::m_hide_pointer_value, lldb_private::DumpValueObjectOptions::m_hide_value, m_options, m_stream, m_summary, m_valobj, m_value, lldb_private::Stream::Printf(), lldb_private::Stream::PutChar(), lldb_private::Stream::PutCString(), ShouldPrintValueObject(), and ShouldShowName().
Referenced by PrintValueObject().
bool ValueObjectPrinter::PrintValueObject | ( | ) |
Definition at line 73 of file ValueObjectPrinter.cpp.
References lldb_private::Status::AsCString(), lldb_private::Stream::EOL(), lldb_private::Status::Fail(), lldb_private::ValueObject::GetCompilerType(), lldb_private::ValueObject::GetError(), GetMostSpecializedValue(), lldb_private::Stream::Indent(), lldb_private::CompilerType::IsValid(), m_orig_valobj, m_stream, m_val_summary_ok, m_valobj, PrintChildrenIfNeeded(), PrintDecl(), lldb_private::Stream::Printf(), PrintLocationIfNeeded(), PrintValueAndSummaryIfNeeded(), and ShouldPrintValueObject().
Referenced by CommandObjectFrameDiagnose::DoExecute(), lldb_private::ValueObject::Dump(), and PrintChild().
|
protected |
Definition at line 552 of file ValueObjectPrinter.cpp.
References lldb_private::TypeSummaryImpl::DoesPrintEmptyAggregates().
|
protected |
Definition at line 499 of file ValueObjectPrinter.cpp.
References lldb_private::DumpValueObjectOptions::PointerDepth::CanAllowExpansion(), and lldb_private::TypeSummaryImpl::DoesPrintChildren().
|
protected |
Definition at line 646 of file ValueObjectPrinter.cpp.
References lldb_private::ValueObject::MightHaveChildren().
|
protected |
Definition at line 173 of file ValueObjectPrinter.cpp.
References lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::DumpValueObjectOptions::m_flat_output, m_options, m_should_print, m_type_flags, and lldb_private::Flags::Test().
Referenced by GetValueSummaryError(), PrintObjectDescriptionIfNeeded(), PrintValueAndSummaryIfNeeded(), and PrintValueObject().
|
private |
Definition at line 832 of file ValueObjectPrinter.cpp.
Referenced by PrintDecl(), PrintObjectDescriptionIfNeeded(), and PrintValueAndSummaryIfNeeded().
|
friend |
Definition at line 146 of file ValueObjectPrinter.h.
|
private |
Definition at line 130 of file ValueObjectPrinter.h.
Referenced by GetMostSpecializedValue(), PrintDecl(), and PrintValueAndSummaryIfNeeded().
|
private |
Definition at line 132 of file ValueObjectPrinter.h.
Referenced by Init(), and PrintDecl().
|
private |
Definition at line 143 of file ValueObjectPrinter.h.
Referenced by Init(), and PrintValueAndSummaryIfNeeded().
|
private |
Definition at line 138 of file ValueObjectPrinter.h.
Referenced by Init(), and IsAggregate().
|
private |
Definition at line 139 of file ValueObjectPrinter.h.
Referenced by Init(), and IsInstancePointer().
|
private |
Definition at line 134 of file ValueObjectPrinter.h.
|
private |
Definition at line 136 of file ValueObjectPrinter.h.
|
private |
Definition at line 137 of file ValueObjectPrinter.h.
|
private |
Definition at line 135 of file ValueObjectPrinter.h.
Referenced by Init(), and IsUninitialized().
|
private |
Definition at line 128 of file ValueObjectPrinter.h.
Referenced by CheckScopeIfNeeded(), GetMostSpecializedValue(), GetRootNameForDisplay(), GetSummaryFormatter(), GetValueSummaryError(), Init(), PrintDecl(), PrintLocationIfNeeded(), PrintObjectDescriptionIfNeeded(), PrintValueAndSummaryIfNeeded(), ShouldPrintValueObject(), and ValueObjectPrinter().
|
private |
Definition at line 125 of file ValueObjectPrinter.h.
Referenced by GetMostSpecializedValue(), Init(), and PrintValueObject().
|
protected |
Definition at line 38 of file ValueObjectPrinter.h.
Referenced by Init().
|
private |
Definition at line 131 of file ValueObjectPrinter.h.
Referenced by Init().
|
private |
Definition at line 133 of file ValueObjectPrinter.h.
Referenced by Init(), and ShouldPrintValueObject().
|
private |
Definition at line 127 of file ValueObjectPrinter.h.
Referenced by Init(), PrintDecl(), PrintLocationIfNeeded(), PrintObjectDescriptionIfNeeded(), PrintValueAndSummaryIfNeeded(), and PrintValueObject().
|
private |
Definition at line 142 of file ValueObjectPrinter.h.
Referenced by Init(), and PrintValueAndSummaryIfNeeded().
|
private |
Definition at line 140 of file ValueObjectPrinter.h.
Referenced by GetSummaryFormatter(), and Init().
|
private |
Definition at line 129 of file ValueObjectPrinter.h.
Referenced by GetMostSpecializedValue(), IsAggregate(), IsPtr(), IsRef(), and ShouldPrintValueObject().
|
private |
Definition at line 144 of file ValueObjectPrinter.h.
Referenced by Init(), and PrintValueObject().
|
private |
Definition at line 126 of file ValueObjectPrinter.h.
Referenced by CheckScopeIfNeeded(), GetDescriptionForDisplay(), GetMostSpecializedValue(), GetRootNameForDisplay(), GetSummaryFormatter(), GetValueSummaryError(), Init(), IsInstancePointer(), IsNil(), IsUninitialized(), PrintDecl(), PrintLocationIfNeeded(), PrintObjectDescriptionIfNeeded(), PrintValueAndSummaryIfNeeded(), and PrintValueObject().
|
private |
Definition at line 141 of file ValueObjectPrinter.h.
Referenced by Init(), and PrintValueAndSummaryIfNeeded().