blob: 5a1bbc9e7b667d83b894430576dd40ed71a10fc5 [file] [log] [blame]
Andrew Walbran3d2c1972020-04-07 12:24:26 +01001//===-- OptionGroupValueObjectDisplay.h -------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef liblldb_OptionGroupValueObjectDisplay_h_
10#define liblldb_OptionGroupValueObjectDisplay_h_
11
12#include "lldb/Core/ValueObject.h"
13#include "lldb/Interpreter/Options.h"
14
15namespace lldb_private {
16
17// OptionGroupValueObjectDisplay
18
19class OptionGroupValueObjectDisplay : public OptionGroup {
20public:
21 OptionGroupValueObjectDisplay();
22
23 ~OptionGroupValueObjectDisplay() override;
24
25 llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
26
27 Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
28 ExecutionContext *execution_context) override;
29 Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
30
31 void OptionParsingStarting(ExecutionContext *execution_context) override;
32
33 bool AnyOptionWasSet() const {
34 return show_types || no_summary_depth != 0 || show_location ||
35 flat_output || use_objc || max_depth != UINT32_MAX ||
36 ptr_depth != 0 || !use_synth || be_raw || ignore_cap ||
37 run_validator;
38 }
39
40 DumpValueObjectOptions GetAsDumpOptions(
41 LanguageRuntimeDescriptionDisplayVerbosity lang_descr_verbosity =
42 eLanguageRuntimeDescriptionDisplayVerbosityFull,
43 lldb::Format format = lldb::eFormatDefault,
44 lldb::TypeSummaryImplSP summary_sp = lldb::TypeSummaryImplSP());
45
46 bool show_types : 1, show_location : 1, flat_output : 1, use_objc : 1,
47 use_synth : 1, be_raw : 1, ignore_cap : 1, run_validator : 1;
48
49 uint32_t no_summary_depth;
50 uint32_t max_depth;
51 uint32_t ptr_depth;
52 uint32_t elem_count;
53 lldb::DynamicValueType use_dynamic;
54};
55
56} // namespace lldb_private
57
58#endif // liblldb_OptionGroupValueObjectDisplay_h_