set print elements number-of-elements
set print elements unlimited
Set a limit on how many elements of an array gdb will print. If gdb is printing
a large array, it stops printing after it has printed the number of elements set
by the set print elements command. This limit also applies to the display of
strings. When gdb starts, this limit is set to 200. Setting number-of-elements
to unlimited or zero means that the number of elements to print is unlimited.
show print elements
Display the number of elements of a large array that gdb will print. If the
number is 0, then the printing is unlimited.
set print elements 0
或
set print elements unlimited