Debugging a DLL (GNAT User’s Guide for Native Platforms)

#### 7.4.8.25 Debugging a DLL ¶

Debugging a DLL is similar to debugging a standard program, but you have to deal with two different executable parts: the DLL and the program that uses it. There are the following four possibilities:

- The program and DLL are built with GCC/GNAT.
- The program is built with foreign tools and the DLL is built with GCC/GNAT.
- The program is built with GCC/GNAT and the DLL is built with foreign tools.

In this section we address only cases one and two above. Note that there is no point in trying to debug a DLL with GNU/GDB if there is no GDB-compatible debugging information in it. To do so, you must use a debugger compatible with the tools suite used to build the DLL.