GDB debug problem with eclipse

Sebastian Fritsch sfritsch@immortalsoftware.com
Tue Jul 29 16:35:00 GMT 2008


Hi everyone.

I'm not sure if I should use this mailing list or rather the eclipse list for 
the problem, so just tell me if i"m wrong.
Im trying to debug an C++ application on Linux with Eclipse 3.3.2 + CDT, Gdb 
version is :GNU gdb 6.6.50.20070726-cvs

The program compiles and runs fine, I compile with -g and start GDB through 
the Eclipse built in command.
My executable gets copied to a different directory (/mypeptide) after linking, 
so I figured I have to add the source files to the gdb command. However, gdb 
does not seem to be able to find the source files, output from console 
follows:

4283^done
4284-exec-arguments -in in.peptide
(gdb) 
4284^done
4285-environment-cd /dpe_local/sfv/workspace/lammps-21May08/examples/mypeptide
(gdb) 
4285^done
(gdb) 
4286-environment-directory /dpe_local/sfv/workspace/lammps-21May08/src /dpe_local/sfv/workspace/lammps-21May08/src/XTC /dpe_local/sfv/workspace/lammps-21May08/src/STUBS /dpe_local/sfv/workspace/lammps-21May08/src/OPT /dpe_local/sfv/workspace/lammps-21May08/src/USER-ACKLAND /dpe_local/sfv/workspace/lammps-21May08/src/GRANULAR /dpe_local/sfv/workspace/lammps-21May08/src/Obj_rasmol /dpe_local/sfv/workspace/lammps-21May08/src/MANYBODY /dpe_local/sfv/workspace/lammps-21May08/src/KSPACE /dpe_local/sfv/workspace/lammps-21May08/src/.settings /dpe_local/sfv/workspace/lammps-21May08/src/DPD /dpe_local/sfv/workspace/lammps-21May08/src/POEMS /dpe_local/sfv/workspace/lammps-21May08/src/MAKE /dpe_local/sfv/workspace/lammps-21May08/src/MAKE/Windows /dpe_local/sfv/workspace/lammps-21May08/src/USER-EWALDN /dpe_local/sfv/workspace/lammps-21May08/src/ASPHERE /dpe_local/sfv/workspace/lammps-21May08/src/COLLOID /dpe_local/sfv/workspace/lammps-21May08/src/MOLECULE /dpe_local/sfv/workspace/lammps-21May08/src/USER-SMD /dpe_local/sfv/workspace/lammps-21May08/src/DIPOLE /dpe_local/sfv/workspace/lammps-21May08/src/CLASS2 /dpe_local/sfv/workspace/lammps-21May08/src/MEAM /dpe_local/sfv/workspace/lammps-21May08/src/USER-CG-CMM
4286^done,source-path="/dpe_local/sfv/workspace/lammps-21May08/src:/dpe_local/sfv/workspace/lammps-21May08/src/XTC:/dpe_local/sfv/workspace/lammps-21May08/src/STUBS:/dpe_local/sfv/workspace/lammps-21May08/src/OPT:/dpe_local/sfv/workspace/lammps-21May08/src/USER-ACKLAND:/dpe_local/sfv/workspace/lammps-21May08/src/GRANULAR:/dpe_local/sfv/workspace/lammps-21May08/src/Obj_rasmol:/dpe_local/sfv/workspace/lammps-21May08/src/MANYBODY:/dpe_local/sfv/workspace/lammps-21May08/src/KSPACE:/dpe_local/sfv/workspace/lammps-21May08/src/.settings:/dpe_local/sfv/workspace/lammps-21May08/src/DPD:/dpe_local/sfv/workspace/lammps-21May08/src/POEMS:/dpe_local/sfv/workspace/lammps-21May08/src/MAKE:/dpe_local/sfv/workspace/lammps-21May08/src/MAKE/Windows:/dpe_local/sfv/workspace/lammps-21May08/src/USER-EWALDN:/dpe_local/sfv/workspace/lammps-21May08/src/ASPHERE:/dpe_local/sfv/workspace/lammps-21May08/src/COLLOID:/dpe_local/sfv/workspace/lammps-21May08/src/MOLECULE:/dpe_local/sfv/workspace/lammps-21May08/src/USER-SMD:/dpe_local/sfv/workspace/lammps-21May08/src/DIPOLE:/dpe_local/sfv/workspace/lammps-21May08/src/CLASS2:/dpe_local/sfv/workspace/lammps-21May08/src/MEAM:/dpe_local/sfv/workspace/lammps-21May08/src/USER-CG-CMM:
$cdir:$cwd"
(gdb) 
4287 info threads
&"info threads\n"
&"No registers.\n"
4287^error,msg="No registers."
(gdb) 
4288-data-list-register-names
4288^done,register-names=["rax","rbx","rcx","rdx","rsi","rdi","rbp","rsp","r8","r9","r10","r11","r12","r13","r14","r15","rip","eflags","cs","ss","ds","es","fs","gs","st0","st1","st2","st3","st4","st5","st6","st7","fctrl","fstat","ftag","fiseg","fioff","foseg","fooff","fop","xmm0","xmm1","xmm2","xmm3","xmm4","xmm5","xmm6","xmm7","xmm8","xmm9","xmm10","xmm11","xmm12","xmm13","xmm14","xmm15","mxcsr","orig_rax"]
(gdb) 
4289-break-insert fix_metadyn.cpp:135
&"No source file named fix_metadyn.cpp.\n"
No source file named fix_metadyn.cpp.
4289^error,msg="No source file named fix_metadyn.cpp."
(gdb) 

The file fix_metadyamics.cpp is in the lammps-21May08/src folder, so it should 
be found by gdb, what am I getting wrong here? Btw, the application also uses 
Mpi so it is compiled trough the mpic++ toolchain, can that be the  problem? 


Thanks a lot for your help!


- Sebastian



More information about the Gdb mailing list