|
| 1 | +# Test that we warn the user about truncated output |
| 2 | +# when target.max-children-count wasn't explicitly set. |
| 3 | + |
| 4 | +# RUN: split-file %s %t |
| 5 | +# RUN: %clang_host -g -gdwarf %t/main.cpp -o %t.out |
| 6 | +# RUN: %lldb -x -b -s %t/dwim-commands.input %t.out -o exit 2>&1 \ |
| 7 | +# RUN: | FileCheck %s --check-prefix=DWIM |
| 8 | +# |
| 9 | +# RUN: %lldb -x -b -s %t/expr-commands.input %t.out -o exit 2>&1 \ |
| 10 | +# RUN: | FileCheck %s --check-prefix=EXPR |
| 11 | +# |
| 12 | +# RUN: %lldb -x -b -s %t/frame-var-commands.input %t.out -o exit 2>&1 \ |
| 13 | +# RUN: | FileCheck %s --check-prefix=VAR |
| 14 | +# |
| 15 | +# RUN: %lldb -x -b -s %t/with-setting-commands.input %t.out -o exit 2>&1 \ |
| 16 | +# RUN: | FileCheck %s --check-prefix=SETTING |
| 17 | + |
| 18 | +#--- main.cpp |
| 19 | + |
| 20 | +int main() { |
| 21 | + int arr[512] = { 3 }; |
| 22 | + __builtin_debugtrap(); |
| 23 | +} |
| 24 | + |
| 25 | +#--- dwim-commands.input |
| 26 | + |
| 27 | +run |
| 28 | +dwim-print arr |
| 29 | +frame variable arr |
| 30 | + |
| 31 | +DWIM: (lldb) dwim-print arr |
| 32 | +DWIM: *** Some of the displayed variables have more members |
| 33 | +DWIM-SAME: use the --show-all-children option to dwim-print |
| 34 | +DWIM: (lldb) frame variable arr |
| 35 | +DWIM-NOT: *** Some of the displayed variables have more members |
| 36 | + |
| 37 | +#--- expr-commands.input |
| 38 | + |
| 39 | +run |
| 40 | +expression arr |
| 41 | +frame variable arr |
| 42 | + |
| 43 | +EXPR: (lldb) expression arr |
| 44 | +EXPR: *** Some of the displayed variables have more members |
| 45 | +EXPR-SAME: use the --show-all-children option to expression |
| 46 | +EXPR: (lldb) frame variable arr |
| 47 | +EXPR-NOT: *** Some of the displayed variables have more members |
| 48 | + |
| 49 | +#--- frame-var-commands.input |
| 50 | + |
| 51 | +run |
| 52 | +frame variable arr |
| 53 | + |
| 54 | +VAR: (lldb) frame variable arr |
| 55 | +VAR: *** Some of the displayed variables have more members |
| 56 | +VAR-SAME: use the --show-all-children option to frame variable |
| 57 | +VAR: (lldb) frame variable arr |
| 58 | +VAR-NOT: *** Some of the displayed variables have more members |
| 59 | + |
| 60 | +#--- with-setting-commands.input |
| 61 | + |
| 62 | +run |
| 63 | +settings set target.max-children-count 1 |
| 64 | +frame variable arr |
| 65 | + |
| 66 | +SETTING: (lldb) frame variable arr |
| 67 | +SETTING-NOT: *** Some of the displayed variables have more members |
0 commit comments