Previous: Program and DLL Both Built with GCC/GNAT, Up: Debugging a DLL

G.13.2 Program Built with Foreign Tools and DLL Built with GCC/GNAT

In this case things are slightly more complex because it is not possible to start the main program and then break at the beginning to load the DLL and the associated DLL debugging information. It is not possible to break at the beginning of the program because there is no GDB debugging information, and therefore there is no direct way of getting initial control. This section addresses this issue by describing some methods that can be used to break somewhere in the DLL to debug it.

First suppose that the main procedure is named main (this is for example some C code built with Microsoft Visual C) and that there is a DLL named test.dll containing an Ada entry point named ada_dll.

The DLL (see Introduction to Dynamic Link Libraries (DLLs)) must have been built with debugging information (see GNAT -g option).