[lldb] Add setting for max depth of value object printing (NFC)
authorDave Lee <davelee.com@gmail.com>
Tue, 26 Apr 2022 23:34:10 +0000 (16:34 -0700)
committerDave Lee <davelee.com@gmail.com>
Tue, 3 May 2022 17:39:42 +0000 (10:39 -0700)
commit2f9fc576be206bd5c4fddfec5f89fceb3554a8d6
tree91a8b4ace608f7763d3ad5675b75c515f0f05e30
parent672b908bca672ad5b0ecffce653242f26a87cd20
[lldb] Add setting for max depth of value object printing (NFC)

This adds a setting (`target.max-children-depth`) that will provide a default value for the `--depth` flag used by `expression` and `frame variable`.

The new setting uses the same default that's currently fixed in source: `UINT32_MAX`.

This provides two purposes:

1. Allowing downstream forks to provide a customized default.
2. Allowing users to set their own default.

Following `target.max-children-count`, a warning is emitted when the max depth is reached. The warning lets users know which flags or settings they can customize. This warning is shown only when the limit is the default value.

rdar://87466495

Differential Revision: https://reviews.llvm.org/D123954
15 files changed:
lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h
lldb/include/lldb/DataFormatters/ValueObjectPrinter.h
lldb/include/lldb/Interpreter/CommandInterpreter.h
lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
lldb/include/lldb/Interpreter/OptionValueProperties.h
lldb/include/lldb/Target/Target.h
lldb/source/Commands/CommandObjectFrame.cpp
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/DataFormatters/DumpValueObjectOptions.cpp
lldb/source/DataFormatters/ValueObjectPrinter.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp
lldb/source/Interpreter/OptionValueProperties.cpp
lldb/source/Target/Target.cpp
lldb/source/Target/TargetProperties.td