Previous: Ravenscar Profile, Up: Ada


15.4.8.8 Known Peculiarities of Ada Mode

Besides the omissions listed previously (see Omissions from Ada), we know of several problems with and limitations of Ada mode in gdb, some of which will be fixed with planned future releases of the debugger and the GNU Ada compiler.

Older versions of the compiler sometimes generate erroneous debugging information, resulting in the debugger incorrectly printing the value of affected entities. In some cases, the debugger is able to work around an issue automatically. In other cases, the debugger is able to work around the issue, but the work-around has to be specifically enabled.

set ada trust-PAD-over-XVS on
Configure GDB to strictly follow the GNAT encoding when computing the value of Ada entities, particularly when PAD and PAD___XVS types are involved (see ada/exp_dbug.ads in the GCC sources for a complete description of the encoding used by the GNAT compiler). This is the default.
set ada trust-PAD-over-XVS off
This is related to the encoding using by the GNAT compiler. If gdb sometimes prints the wrong value for certain entities, changing ada trust-PAD-over-XVS to off activates a work-around which may fix the issue. It is always safe to set ada trust-PAD-over-XVS to off, but this incurs a slight performance penalty, so it is recommended to leave this setting to on unless necessary.