Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging Visual Studio builds from Eclipse

I'm just starting out on a cross-platform (Windows, Linux, OS X) C++ project, and we've decided to use Scons for our build system and Eclipse as our IDE. I've figured out how to trigger Scons to do a Visual C++ build from Eclipse, and for errors etc. to get reflected in Eclipse, so all good so far. However, what would be really nice is if we could use Eclipse for debugging as well, but Eclipse's various gdb debugging options can't read the debug symbols that VC puts into the build. So does anyone know a way round this, or (as I suspect) will I have to use Visual Studio for debugging?

Obviously this is by no means a bad solution, but using a single IDE would be even better!

Thanks in advance for any help....

like image 469
tinyd Avatar asked Aug 26 '09 12:08

tinyd


1 Answers

Visual C++ creates PDB files for its own symbols that map into the binary. The only provision for other debuggers is to C7 format and hope that is enough for gdb.

Go to Properties | C/C++ | General | Debug Information = C7 Compatible (instead of the default PDB). Command line is /Z7 instead of other /Z? (which can be PDB or PDB with continue).

like image 67
AlexC Avatar answered Sep 20 '22 13:09

AlexC