interaction with gprof
Janus Weil
janus@gcc.gnu.org
Mon Nov 18 16:00:00 GMT 2013
2013/11/18 Janus Weil <janus@gcc.gnu.org>:
>> I vaguely remember problems with getting proper backtraces into
>> internal subroutines (which occurred to me a couple of times, but
>> never bothered me enough to take action). That's very probably
>> related.
>
> OTOH, at least a simple example seems to work with current gfortran
> (see below), so either the backtrace problem has been fixed or I was
> just fantasizing (or maybe the problem was with ifort?) ...
Ok, to follow up on that, I think the problems I remember were indeed
with ifort, which misses a good part of the backtrace when not using
-g (see below).
Sorry for the noise ...
Cheers,
Janus
> cat bt_ifort.f90
module m
contains
subroutine s1
call s2()
contains
subroutine s2
call tracebackqq()
end subroutine
end subroutine
end module
program p
use m
call s1()
end
> ifort bt_ifort.f90 -traceback
> ./a.out
Image PC Routine Line
Source
a.out 0000000000463D4A Unknown Unknown Unknown
a.out 0000000000462846 Unknown Unknown Unknown
a.out 000000000041AEB0 Unknown Unknown Unknown
a.out 0000000000405486 Unknown Unknown Unknown
a.out 0000000000402C46 MAIN__ 17 bt_ifort.f90
a.out 0000000000402BEC Unknown Unknown Unknown
libc.so.6 00007F96E0D6FB7D Unknown Unknown Unknown
a.out 0000000000402AE9 Unknown Unknown Unknown
More information about the Fortran
mailing list