Previous: Solaris Threads Issues, Up: Solaris-Specific Considerations

A.4.2 Building and Debugging 64-bit Applications

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, dwarf-2 debug information is required, so you have to add -gdwarf-2 to your gnatmake arguments. In addition, 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 -gdwarf-2 --RTS=m64 hello.adb
          $ gdb64 hello