GDB with Ada doesn't print variables neither works with GPS

Joel Brobecker brobecker@adacore.com
Mon Jul 30 03:21:00 GMT 2007


> It seems I'm unable to print variables properly in GDB when debugging
> an Ada application. This is the best I can get:
> 
> (gdb) p /c Hello_String.all
> $1 = (72 'H', 101 'e', 108 'l', 108 'l', 111 'o')

The only thing that you are missing here is the fact that this string
is not printed as a usual string but instead an array of characters.
I suspect that the reason that GDB does not identify your object as
a string is incomplete/incorrect debugging info.

What does ptype Hello_String.all say? It should say "array of
character". If it doesn't then, the GDB output is expected.

For your GPS issues, it's most likely an issue with your kernel
configuration, but I can't help you with that.

-- 
Joel



More information about the Gdb mailing list