In a 64-bit application, all the sources involved must be compiled with the -m64 command-line option, and a specific GNAT library (compiled with this option) is required. The easiest way to build a 64bit application is to add -m64 --RTS=m64 to the gnatmake flags.
To debug these applications, a special version of gdb called gdb64 needs to be used.
To summarize, building and debugging a “Hello World” program in 64-bit mode amounts to:
$ gnatmake -m64 -g --RTS=m64 hello.adb $ gdb64 hello