Next: Ada Glitches, Previous: Ravenscar Profile, Up: Ada   [Contents][Index]


15.4.10.10 Ada Settings

set varsize-limit size

Prevent GDB from attempting to evaluate objects whose size is above the given limit (size) when those sizes are computed from run-time quantities. This is typically the case when the object has a variable size, such as an array whose bounds are not known at compile time for example. Setting size to unlimited 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

Show the limit on types whose size is determined by run-time quantities.