debugging using gdb on windows

Hello all,

I am trying to debug using gdb on windows without any luck so far. I am compiling the program with ‘pgcc -g hello.c -o hello’ and starts the session with ‘gdb hello’. Gdb loads ok, but reports that no debugging symbols is found. I have tried this with pgi version 10.5 and 10.6 (gdb version 6.8 and 7.1), but same same.

Have I forgotten something here? I thought gdb format is supported?

I have set up my editor, Slickedit, to compile/build using the pgi compiler. Slickedit also support debugging via gdb, and hence it would be neat to get this working.

Any ideas?

Best regards,

Hi Per-Aksel,

I thought gdb format is supported?

We use standard DWARF debugging information. However on Windows, the DWARF symbols must be extracted into a separate “.dwf” file so is most likely why gdb cann’t find the debugging symbols. Having never used gdb on Windows, I don’t know of way to have gdb read this file.

Any reason why you can use the PGI Debugger PGDBG? It has a very nice GUI.

  • Mat

Hi Mat,

Thanks! That was good information!

I am using pgdbg, but it would also be nice to be able to use the internal gdb support of Slickedit as well for fast class/function testing.

Another thing. When I use pgdbg I run into a problem. If I have loaded hello.exe into pgdbg (pgdbg hello) and do some debugging, and then detaches the target, pgdbg still have a lock on the file. This means I cannot compile and link without exiting pgdbg. Of course if I exit pgdbg and restart on the command line everything is ok, but it would be nice to retain the windows and just start a new session when still inside pgdbg.

I started a debug session with hello.exe, detached, and tried to load another app to debug. This resulted in a pgdbg crash (version 10.6).

Best regards,

I have filed a problem report on the “crash with second attach” issue you reported. If you want to be notified when the status of that issue changes, send email to and ask to be added to the notify list for TPR 15105.