Next: , Up: Program Built with Foreign Tools and DLL Built with GCC/GNAT

F.13.2.1 Debugging the DLL Directly
  1. Launch the debugger on the DLL.
              $ gdb -nw test.dll
  2. Set a breakpoint on a DLL subroutine.
              (gdb) break ada_dll.adb:45

    Note that at this point it is not possible to break using the routine symbol directly as the program is not yet running. The solution is to break on the proper line (break in ada_dll.adb line 45).

  3. Specify the executable file to GDB.
              (gdb) exec-file main.exe
  4. Run the program.
              (gdb) run

    This will run the program until it reaches the breakpoint that has been set. From that point you can use the standard way to debug a program as described in (see Running and Debugging Ada Programs).

It is also possible to debug the DLL by attaching to a running process.