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

Traceback line numbers do not match source line numbers

gtokic
Beginner
2,755 Views

Hi,

I have an example where lines reported in the traceback on an error do not match source line numbers. The same mismatch exists between gdb line numbers and the source file. The mismatch starts midway through the main file, and it is occurring in at least one linked module file. 

This is the first time I've seen such an example, and I haven't noticed it in any other version of the code using the same module files. I made a clean compile with -c -r8 -heap-arrays -g -debug -traceback -O0 -check all -ftrapuv -fp-stack-check -fpe0 -gen-interfaces -warn interfaces -p. 

I'm using ifort version 15.0.2. I would appreciate any clarification on this matter.

Thanks,

Grgur

0 Kudos
1 Solution
mecej4
Honored Contributor III
2,755 Views

In different contexts, I have seen similar problems when a text file contains inconsistent line terminators, i.e., some lines are terminated by CR, some by LF, CR+LF, CR+CR+LF, etc. We can check for this particular issue if you can post one of the files (as an attachment, zipped or not, but not in-line).

View solution in original post

0 Kudos
4 Replies
Kevin_D_Intel
Employee
2,755 Views

Sounds like maybe there could be a debug emission issues related to line number information affecting both the traceback and gdb. We could investigate further and try newer compilers with a reproducer.

Can you provide a complete reproducer that we can investigate with?

0 Kudos
gtokic
Beginner
2,755 Views

I will try to clear up the code, while still preserving the problem. It's a bit of a cumbersome procedure because it's a large code and the problem never occurred before, but hopefully I can reproduce the issue with a simpler example. Is there something else I can try if that fails?

0 Kudos
mecej4
Honored Contributor III
2,756 Views

In different contexts, I have seen similar problems when a text file contains inconsistent line terminators, i.e., some lines are terminated by CR, some by LF, CR+LF, CR+CR+LF, etc. We can check for this particular issue if you can post one of the files (as an attachment, zipped or not, but not in-line).

0 Kudos
gtokic
Beginner
2,755 Views

It was the line terminators, thanks for the tip! Some of the lines were terminated by CR+LF, and some by LF. After converting all to CR+LF, idb puts breakpoints in right places. 

0 Kudos
Reply