Set commands for Ada
Ada introduces one new set
command.
set varsize-limit
size
- Limit the size of the types of objects to size bytes
when those sizes are computed from run-time quantities.
When this limit is set to 0, there is no
limit. By default, it is about 65K. 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 dynamic 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.