I use VS2k8 to write and compile (but not run) a program using the MPICH2 libraries on Vista x64. I then use mpiexec
from the command line to launch the program (with only 1 process for the purposes of debugging), and I'd like to attach gdb to it. Simply using attach
or gdb --pid=###
doesn't work (I get the error Can't attach to process
), presumably because VS doesn't compile the code with the right debug info. On the other hand, despite several google sessions I have yet to find the actual command line that VS uses to compile, so I can't just go in and edit it.
Note that the only reason I use VS is because I couldn't get g++ to find the MPI libraries when trying to compile from command line, whereas VS only needed a couple clicks to make everything work. (Yes, I tried the -I
and -l
switches, but to no avail)
All I need is attaching gdb to the process running my MPI program, I don't really care how it's done. Any help is appreciated.