Debugging with GDB: Additions to Ada |
---|
Next: Overloading support for Ada, Previous: Omissions from Ada, Up: Ada [Contents][Index]
As it does for other languages, GDB makes certain generic extensions to Ada (see Expressions):
E@N
displays the values of E and the
N-1 adjacent variables following it in memory as an array. In
Ada, this operator is generally not necessary, since its prime use is
in displaying parts of an array, and slicing will usually do this in
Ada. However, there are occasional uses when debugging programs in
which certain debugging information has been optimized away.
B::var
means “the variable named var that
appears in function or file B.” When B is a file name,
you must typically surround it in single quotes.
{type} addr
means “the variable of type
type that appears at address addr.”
In addition, GDB provides a few other shortcuts and outright additions specific to Ada:
(gdb) set x := y + 3 (gdb) print A(tmp := y + 1)
(gdb) break f (gdb) condition 1 (report(i); k += 1; A(k) > 100)
"One line.["0a"]Next line.["0a"]"
contains an ASCII newline character (Ada.Characters.Latin_1.LF
)
after each period.
(gdb) print 'max(x, y)
(3 => 10, 17, 1)
That is, in contrast to valid Ada, only the first component has a =>
clause.
(gdb) print <JMPBUF_SAVE>[0]
Next: Overloading support for Ada, Previous: Omissions from Ada, Up: Ada [Contents][Index]