set varsize-limit
sizeunlimited
removes the size limitation. By default, the limit is about 65KB.
The purpose of having such a limit is to prevent gdb from
trying to grab enormous chunks of virtual memory when asked to evaluate
a quantity whose bounds have been corrupted or have not yet been fully
initialized. The limit applies to the results of some subexpressions
as well as to complete expressions. For example, an expression denoting
a simple integer component, such as x.y.z
, may fail if the size of
x.y
is variable and exceeds size
. On the other hand,
gdb is sometimes clever; the expression A(i)
, where
A
is an array variable with non-constant size, will generally
succeed regardless of the bounds on A
, as long as the component
size is less than size.
show varsize-limit