17#include "llvm/ADT/ArrayRef.h"
25 eArgTypeNone,
"Show the object as its full dynamic type, not its static "
26 "type, if available."},
29 "Show the object obeying its synthetic provider, if available."},
31 nullptr, {}, 0,
eArgTypeCount,
"Set the max recurse depth when dumping "
32 "aggregate types (default is infinity)."},
34 {}, 0,
eArgTypeNone,
"Display results in a flat format that uses "
35 "expression paths for each variable or member."},
37 {}, 0,
eArgTypeNone,
"Show variable location information."},
40 "Display using a language-specific description API, if possible."},
42 nullptr, {}, 0,
eArgTypeCount,
"The number of pointers to be traversed "
43 "when dumping values (default is zero)."},
46 "Show variable types when dumping values."},
49 "Set the depth at which omitting summary information stops (default is "
52 nullptr, {}, 0,
eArgTypeNone,
"Don't use formatting options."},
55 "Ignore the upper bound on the number of children to show."},
60 "Treat the result of the expression as if its type is an array of this "
63llvm::ArrayRef<OptionDefinition>
69 uint32_t option_idx, llvm::StringRef option_arg,
75 switch (short_option) {
103 if (option_arg.getAsInteger(0,
max_depth)) {
105 error.SetErrorStringWithFormat(
"invalid max depth '%s'",
106 option_arg.str().c_str());
115 error.SetErrorStringWithFormat(
"invalid element count '%s'",
116 option_arg.str().c_str());
121 if (option_arg.getAsInteger(0,
ptr_depth)) {
123 error.SetErrorStringWithFormat(
"invalid pointer depth '%s'",
124 option_arg.str().c_str());
129 if (option_arg.empty())
133 error.SetErrorStringWithFormat(
"invalid pointer depth '%s'",
134 option_arg.str().c_str());
141 error.SetErrorStringWithFormat(
"invalid synthetic-type '%s'",
142 option_arg.str().c_str());
148 error.SetErrorStringWithFormat(
"invalid validate '%s'",
149 option_arg.str().c_str());
153 llvm_unreachable(
"Unimplemented option");
180 auto max_depth_config = target_sp->GetMaximumDepthOfChildrenToDisplay();
181 max_depth = std::get<uint32_t>(max_depth_config);
210 if (lang_descr_verbosity ==
static llvm::raw_ostream & error(Stream &strm)
static constexpr OptionDefinition g_option_table[]
static const OptionDefinition g_option_table[]
DumpValueObjectOptions & SetFlatOutput(bool flat=false)
DumpValueObjectOptions & SetHideName(bool hide_name=false)
DumpValueObjectOptions & SetShowTypes(bool show=false)
DumpValueObjectOptions & SetMaximumDepth(uint32_t depth, bool is_default)
DumpValueObjectOptions & SetHideRootType(bool hide_root_type=false)
DumpValueObjectOptions & SetSummary(lldb::TypeSummaryImplSP summary=lldb::TypeSummaryImplSP())
DumpValueObjectOptions & SetUseSyntheticValue(bool use_synthetic=true)
DumpValueObjectOptions & SetOmitSummaryDepth(uint32_t depth=0)
DumpValueObjectOptions & SetUseDynamicType(lldb::DynamicValueType dyn=lldb::eNoDynamicValues)
DumpValueObjectOptions & SetFormat(lldb::Format format=lldb::eFormatDefault)
DumpValueObjectOptions & SetIgnoreCap(bool ignore=false)
DumpValueObjectOptions & SetRawDisplay()
DumpValueObjectOptions & SetShowSummary(bool show=true)
DumpValueObjectOptions & SetUseObjectiveC(bool use=false)
DumpValueObjectOptions & SetShowLocation(bool show=false)
DumpValueObjectOptions & SetMaximumPointerDepth(PointerDepth depth={PointerDepth::Mode::Never, 0})
DumpValueObjectOptions & SetHideValue(bool hide_value=false)
DumpValueObjectOptions & SetRunValidator(bool run=true)
DumpValueObjectOptions & SetElementCount(uint32_t element_count=0)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
const lldb::TargetSP & GetTargetSP() const
Get accessor to get the target shared pointer.
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, ExecutionContext *execution_context) override
void OptionParsingStarting(ExecutionContext *execution_context) override
DumpValueObjectOptions GetAsDumpOptions(LanguageRuntimeDescriptionDisplayVerbosity lang_descr_verbosity=eLanguageRuntimeDescriptionDisplayVerbosityFull, lldb::Format format=lldb::eFormatDefault, lldb::TypeSummaryImplSP summary_sp=lldb::TypeSummaryImplSP())
lldb::DynamicValueType use_dynamic
bool max_depth_is_default
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
uint32_t no_summary_depth
A class that represents a running process on the host machine.
OptionEnumValues GetDynamicValueTypes()
LanguageRuntimeDescriptionDisplayVerbosity
@ eLanguageRuntimeDescriptionDisplayVerbosityCompact
std::shared_ptr< lldb_private::TypeSummaryImpl > TypeSummaryImplSP
Format
Display format definitions.
std::shared_ptr< lldb_private::Target > TargetSP
static int64_t ToOptionEnum(llvm::StringRef s, const OptionEnumValues &enum_values, int32_t fail_value, Status &error)
static bool ToBoolean(llvm::StringRef s, bool fail_value, bool *success_ptr)
int short_option
Single character for this option.