Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29277 Discussions

Getting line number info when debugging

vblum
Beginner
725 Views
Hi,

this is a trivial question, and I am only posting since I simply couldn't find the (perhaps obvious) answer even after browsing several manuals. Any solution, however obvious, is greatly appreciated.

When a compiled binary of mine segfaults, it would be really nice to simply get the source file and line number where this occurred. All that I can see indicates that ifort should be able to do this, but even with -O0, -g, idb, and the source directory specified on the idb command line, I simply get:

Image PC Routine Line Source
localorb.101006.m 0854E55C Unknown Unknown Unknown
localorb.101006.m 0854CCF5 Unknown Unknown Unknown
localorb.101006.m 08522EA6 Unknown Unknown Unknown
localorb.101006.m 084FDC44 Unknown Unknown Unknown
localorb.101006.m 081C7CDC Unknown Unknown Unknown
localorb.101006.m 0804CD30 Unknown Unknown Unknown
localorb.101006.m 0804A8BE Unknown Unknown Unknown
libc.so.6 403B4500 Unknown Unknown Unknown
localorb.101006.m 0804A7E1 Unknown Unknown Unknown

in conjunction with the segfault. I have tried various other combinations of flags, but have never been able to get line numbers out of ifort-compiled code, or even a hint as to what the problem may be.

With all other compilers that I typically try (g95, xlf, decfortran) this works out of the box, and the ifort manuals imply at places that it should work out of the box here, also.

Thanks for any hints!
0 Kudos
1 Reply
Steven_L_Intel1
Employee
725 Views
Try adding -traceback. This is not related to debugging.
0 Kudos
Reply