Skip to content

Commit ff12762

Browse files
authored
[lldb] Reduce max-children-count default to readable size (#139826)
Change the default from 256 to 24. The argument is that 256 is too large to be scanned by eye, and too large to print in a terminal which can be only 40-50 lines in height. When all children must be shown, `frame variable` and `expression` both support the `-A` (`--show-all-children`) flag. rdar://145327522
1 parent 7e9d9db commit ff12762

20 files changed

+12
-27
lines changed

lldb/source/Target/TargetProperties.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ let Definition = "target" in {
9696
DefaultUnsignedValue<6>,
9797
Desc<"The maximum number of zeroes to insert when displaying a very small float before falling back to scientific notation.">;
9898
def MaxChildrenCount: Property<"max-children-count", "UInt64">,
99-
DefaultUnsignedValue<256>,
99+
DefaultUnsignedValue<24>,
100100
Desc<"Maximum number of children to expand in any level of depth.">;
101101
def MaxChildrenDepth: Property<"max-children-depth", "UInt64">,
102102
DefaultUnsignedValue<0xFFFFFFFF>,

lldb/test/API/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_with_run_command(self):
3939
def cleanup():
4040
self.runCmd("type format clear", check=False)
4141
self.runCmd("type summary clear", check=False)
42-
self.runCmd("settings set target.max-children-count 256", check=False)
42+
self.runCmd("settings set target.max-children-count 24", check=False)
4343

4444
# Execute the cleanup function during test case tear down.
4545
self.addTearDownHook(cleanup)

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/forward_list/TestDataFormatterGenericForwardList.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def do_test(self, stdlib_type):
5050
self.expect(
5151
"settings show target.max-children-count",
5252
matching=True,
53-
substrs=["target.max-children-count (unsigned) = 256"],
53+
substrs=["target.max-children-count (unsigned) = 24"],
5454
)
5555

5656
self.expect(
@@ -73,7 +73,7 @@ def do_test(self, stdlib_type):
7373
self.expect(
7474
"frame variable thousand_elts",
7575
matching=True,
76-
substrs=["size=256", "[0]", "[1]", "[2]", "..."],
76+
substrs=["size=24", "[0]", "[1]", "[2]", "..."],
7777
)
7878

7979
def do_test_ptr_and_ref(self, stdlib_type):

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def cleanup():
5050
self.runCmd("type summary clear", check=False)
5151
self.runCmd("type filter clear", check=False)
5252
self.runCmd("type synth clear", check=False)
53-
self.runCmd("settings set target.max-children-count 256", check=False)
5453

5554
# Execute the cleanup function during test case tear down.
5655
self.addTearDownHook(cleanup)

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multimap/TestDataFormatterGenericMultiMap.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def cleanup():
6565
self.runCmd("type summary clear", check=False)
6666
self.runCmd("type filter clear", check=False)
6767
self.runCmd("type synth clear", check=False)
68-
self.runCmd("settings set target.max-children-count 256", check=False)
6968

7069
# Execute the cleanup function during test case tear down.
7170
self.addTearDownHook(cleanup)

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/multiset/TestDataFormatterGenericMultiSet.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def cleanup():
5151
self.runCmd("type summary clear", check=False)
5252
self.runCmd("type filter clear", check=False)
5353
self.runCmd("type synth clear", check=False)
54-
self.runCmd("settings set target.max-children-count 256", check=False)
5554

5655
# Execute the cleanup function during test case tear down.
5756
self.addTearDownHook(cleanup)

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def cleanup():
5151
self.runCmd("type summary clear", check=False)
5252
self.runCmd("type filter clear", check=False)
5353
self.runCmd("type synth clear", check=False)
54-
self.runCmd("settings set target.max-children-count 256", check=False)
5554

5655
# Execute the cleanup function during test case tear down.
5756
self.addTearDownHook(cleanup)

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered/TestDataFormatterGenericUnordered.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def cleanup():
3333
self.runCmd("type summary clear", check=False)
3434
self.runCmd("type filter clear", check=False)
3535
self.runCmd("type synth clear", check=False)
36-
self.runCmd("settings set target.max-children-count 256", check=False)
3736
self.runCmd("settings set auto-one-line-summaries true", check=False)
3837

3938
# Execute the cleanup function during test case tear down.

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def cleanup():
4343
self.runCmd("type summary clear", check=False)
4444
self.runCmd("type filter clear", check=False)
4545
self.runCmd("type synth clear", check=False)
46-
self.runCmd("settings set target.max-children-count 256", check=False)
4746

4847
# Execute the cleanup function during test case tear down.
4948
self.addTearDownHook(cleanup)

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def cleanup():
5050
self.runCmd("type summary clear", check=False)
5151
self.runCmd("type filter clear", check=False)
5252
self.runCmd("type synth clear", check=False)
53-
self.runCmd("settings set target.max-children-count 256", check=False)
5453

5554
# Execute the cleanup function during test case tear down.
5655
self.addTearDownHook(cleanup)

0 commit comments

Comments
 (0)