CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
230 lines
6.1 KiB
C++
230 lines
6.1 KiB
C++
//===-- DumpValueObjectOptions.cpp ----------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "lldb/DataFormatters/DumpValueObjectOptions.h"
|
|
|
|
#include "lldb/ValueObject/ValueObject.h"
|
|
|
|
using namespace lldb;
|
|
using namespace lldb_private;
|
|
|
|
DumpValueObjectOptions::DumpValueObjectOptions()
|
|
: m_summary_sp(), m_root_valobj_name(), m_decl_printing_helper(),
|
|
m_child_printing_decider(), m_pointer_as_array(), m_use_synthetic(true),
|
|
m_scope_already_checked(false), m_flat_output(false), m_ignore_cap(false),
|
|
m_show_types(false), m_show_location(false), m_use_object_desc(false),
|
|
m_hide_root_type(false), m_hide_root_name(false), m_hide_name(false),
|
|
m_hide_value(false), m_run_validator(false),
|
|
m_use_type_display_name(true), m_allow_oneliner_mode(true),
|
|
m_hide_pointer_value(false), m_reveal_empty_aggregates(true) {}
|
|
|
|
DumpValueObjectOptions::DumpValueObjectOptions(ValueObject &valobj)
|
|
: DumpValueObjectOptions() {
|
|
m_use_dynamic = valobj.GetDynamicValueType();
|
|
m_use_synthetic = valobj.IsSynthetic();
|
|
m_varformat_language = valobj.GetPreferredDisplayLanguage();
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetMaximumPointerDepth(uint32_t depth) {
|
|
m_max_ptr_depth = {depth};
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetMaximumDepth(uint32_t depth, bool is_default) {
|
|
m_max_depth = depth;
|
|
m_max_depth_is_default = is_default;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetDeclPrintingHelper(DeclPrintingHelper helper) {
|
|
m_decl_printing_helper = helper;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetChildPrintingDecider(ChildPrintingDecider decider) {
|
|
m_child_printing_decider = decider;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &DumpValueObjectOptions::SetShowTypes(bool show) {
|
|
m_show_types = show;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &DumpValueObjectOptions::SetShowLocation(bool show) {
|
|
m_show_location = show;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &DumpValueObjectOptions::DisableObjectDescription() {
|
|
// Reset these options to their default values.
|
|
SetUseObjectDescription(false);
|
|
SetHideRootType(false);
|
|
SetHideName(false);
|
|
SetHideValue(false);
|
|
SetShowSummary(true);
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetUseObjectDescription(bool use) {
|
|
m_use_object_desc = use;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &DumpValueObjectOptions::SetShowSummary(bool show) {
|
|
if (!show)
|
|
SetOmitSummaryDepth(UINT32_MAX);
|
|
else
|
|
SetOmitSummaryDepth(0);
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetUseDynamicType(lldb::DynamicValueType dyn) {
|
|
m_use_dynamic = dyn;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetUseSyntheticValue(bool use_synthetic) {
|
|
m_use_synthetic = use_synthetic;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &DumpValueObjectOptions::SetScopeChecked(bool check) {
|
|
m_scope_already_checked = check;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &DumpValueObjectOptions::SetFlatOutput(bool flat) {
|
|
m_flat_output = flat;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetOmitSummaryDepth(uint32_t depth) {
|
|
m_omit_summary_depth = depth;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &DumpValueObjectOptions::SetIgnoreCap(bool ignore) {
|
|
m_ignore_cap = ignore;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &DumpValueObjectOptions::SetRawDisplay() {
|
|
SetUseSyntheticValue(false);
|
|
SetOmitSummaryDepth(UINT32_MAX);
|
|
SetIgnoreCap(true);
|
|
SetHideName(false);
|
|
SetHideValue(false);
|
|
SetUseTypeDisplayName(false);
|
|
SetAllowOnelinerMode(false);
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &DumpValueObjectOptions::SetFormat(lldb::Format format) {
|
|
m_format = format;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetSummary(lldb::TypeSummaryImplSP summary) {
|
|
m_summary_sp = summary;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetRootValueObjectName(const char *name) {
|
|
if (name)
|
|
m_root_valobj_name.assign(name);
|
|
else
|
|
m_root_valobj_name.clear();
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetHideRootType(bool hide_root_type) {
|
|
m_hide_root_type = hide_root_type;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetHideRootName(bool hide_root_name) {
|
|
m_hide_root_name = hide_root_name;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &DumpValueObjectOptions::SetHideName(bool hide_name) {
|
|
m_hide_name = hide_name;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &DumpValueObjectOptions::SetHideValue(bool hide_value) {
|
|
m_hide_value = hide_value;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &DumpValueObjectOptions::SetHidePointerValue(bool hide) {
|
|
m_hide_pointer_value = hide;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetVariableFormatDisplayLanguage(
|
|
lldb::LanguageType lang) {
|
|
m_varformat_language = lang;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &DumpValueObjectOptions::SetRunValidator(bool run) {
|
|
m_run_validator = run;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetUseTypeDisplayName(bool dis) {
|
|
m_use_type_display_name = dis;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetAllowOnelinerMode(bool oneliner) {
|
|
m_allow_oneliner_mode = oneliner;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetRevealEmptyAggregates(bool reveal) {
|
|
m_reveal_empty_aggregates = reveal;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetExpandPointerTypeFlags(unsigned flags) {
|
|
m_expand_ptr_type_flags = flags;
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &
|
|
DumpValueObjectOptions::SetElementCount(uint32_t element_count) {
|
|
m_pointer_as_array = PointerAsArraySettings(element_count);
|
|
return *this;
|
|
}
|
|
|
|
DumpValueObjectOptions &DumpValueObjectOptions::SetPointerAsArray(
|
|
const PointerAsArraySettings &ptr_array) {
|
|
m_pointer_as_array = ptr_array;
|
|
return *this;
|
|
}
|