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)

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py

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

4645
is_64_bit = self.process().GetAddressByteSize() == 8
4746

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/TestDataFormatterLibcxxStringView.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def cleanup():
5555
self.runCmd("type summary clear", check=False)
5656
self.runCmd("type filter clear", check=False)
5757
self.runCmd("type synth clear", check=False)
58-
self.runCmd("settings set target.max-children-count 256", check=False)
5958

6059
# Execute the cleanup function during test case tear down.
6160
self.addTearDownHook(cleanup)

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ def cleanup():
4242
self.runCmd("type summary clear", check=False)
4343
self.runCmd("type filter clear", check=False)
4444
self.runCmd("type synth clear", check=False)
45-
self.runCmd("settings set target.max-children-count 256", check=False)
45+
self.runCmd("settings set target.max-children-count 24", check=False)
4646

4747
# Execute the cleanup function during test case tear down.
4848
self.addTearDownHook(cleanup)
4949

5050
self.expect(
51-
"frame variable vBool",
51+
"frame variable -A vBool",
5252
substrs=[
5353
"size=49",
5454
"[0] = false",
@@ -62,7 +62,7 @@ def cleanup():
6262
)
6363

6464
self.expect(
65-
"expr vBool",
65+
"expr -A -- vBool",
6666
substrs=[
6767
"size=49",
6868
"[0] = false",

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py

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

7271
# Execute the cleanup function during test case tear down.
7372
self.addTearDownHook(cleanup)

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.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/libstdcpp/map/TestDataFormatterStdMap.py

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

4645
# Execute the cleanup function during test case tear down.
4746
self.addTearDownHook(cleanup)

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py

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

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

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,12 @@ def cleanup():
4242
self.runCmd("type summary clear", check=False)
4343
self.runCmd("type filter clear", check=False)
4444
self.runCmd("type synth clear", check=False)
45-
self.runCmd("settings set target.max-children-count 256", check=False)
4645

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

5049
self.expect(
51-
"frame variable vBool",
50+
"frame variable -A vBool",
5251
substrs=[
5352
"size=49",
5453
"[0] = false",
@@ -62,7 +61,7 @@ def cleanup():
6261
)
6362

6463
self.expect(
65-
"expr vBool",
64+
"expr -A -- vBool",
6665
substrs=[
6766
"size=49",
6867
"[0] = false",

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py

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

4645
# Execute the cleanup function during test case tear down.
4746
self.addTearDownHook(cleanup)

lldb/test/API/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ 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)
46+
self.runCmd("settings set target.max-children-count 24", check=False)
4747

4848
# Execute the cleanup function during test case tear down.
4949
self.addTearDownHook(cleanup)
@@ -68,10 +68,10 @@ def cleanup():
6868
"r = 34",
6969
],
7070
)
71-
# num_children() should be called with at most max_num_children=257
71+
# num_children() should be called with at most max_num_children=25
7272
# (target.max-children-count + 1)
7373
self.expect(
74-
"script fooSynthProvider.reset_max_num_children_max()", substrs=["257"]
74+
"script fooSynthProvider.reset_max_num_children_max()", substrs=["25"]
7575
)
7676

7777
# check that capping works

0 commit comments

Comments
 (0)