Thanks! It solves this problem 2015-04-16 14:55 GMT-04:00 Matthew Knepley <[email protected]>:
> On Thu, Apr 16, 2015 at 1:35 PM, Song Gao <[email protected]> > wrote: > >> Dear PETSc users, >> >> I'm debugging my code but cannot see those line informations in gdb >> >> I compiled PETSc with >> --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-fblaslapack >> --download-mpich --with-debugging=yes >> >> I modified my code from KSP ex1f.F and use that makefile. >> >> Then compiled code >> make PETSC_DIR=/home/cfd/sgao/bin/petsc-3.5.3 >> PETSC_ARCH=FEM_project_DEBUG ex1f >> The log is attached, I see the -g flag there. But when I run code with >> gdb, I didn't see line information there. >> >> >> $gdb ./ex1f >> (gdb) b main >> Breakpoint 1 at 0x4080e0: file ../../../gcc-4.3.0/libgfortran/fmain.c, >> line 11. >> > > main() is not the Fortran entry point. You might be better off working in > C. > > However, if you really want Fortran, try breaking at a line number in your > file. Also > make sure you did not delete the *.o file > > Matt > > >> (gdb) r >> Starting program: /home/cfd/sgao/FEM_in_CFD/code/ex1f >> [Thread debugging using libthread_db enabled] >> >> Breakpoint 1, main (argc=1, argv=0x7fffffffcc58) at >> ../../../gcc-4.3.0/libgfortran/fmain.c:11 >> 11 ../../../gcc-4.3.0/libgfortran/fmain.c: No such file or directory. >> in ../../../gcc-4.3.0/libgfortran/fmain.c >> (gdb) l >> 6 in ../../../gcc-4.3.0/libgfortran/fmain.c >> (gdb) >> >> >> What did I miss here? Thank you in advance. >> >> Song >> > > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener >
