DundeeDave DundeeDave - 7 months ago 59
C++ Question

Debugging Intel Compiled Project with GDB

I've got a simple Hello World project in the Code::Blocks IDE which I'm compiling using the Intel C++ compiler.

I've set the compiler option '/Zi' in the projects Build Settings so I can debug the application with breakpoints. However no breakpoints are ever reached.
It appears that no debugging symbols can be found within the object.

They are correctly reached when I change to use the gcc compiler however.

What am I missing here? Shouldn't this work as is?


Seems to work on Linux but not on Windows. I ran the same sort of test a simple project with Intel compiler and the correct compiler option and I could reach breakpoints. Is there some reason Windows would have a problem?


Is there some reason Windows would have a problem?

On UNIX, the debug info is usually completely documented, and often standard (e.g. Linux uses DWARF).

On Windows, Microsoft compilers use .PDB (Program Database) files, which are completely undocumented and proprietary. GDB can't use them.

I don't know what debug info format Intel compiler generates, but chances are that format is only understood by idb.

Effectively then, you can't mix and match GDB with any of the Microsoft or Intel compilers.