thanks for replies.
But i forgot to precise that i need something usable in Fortran program, not in C.
printstack is usable in C program, is there an equivalent for fortran programs?
I'm not a fortran developper, someone just showed me that intel fortran compiler had a function "tracebackqq()" and it's very useful.
however, I'll give a try to printstack() and dbx in fortran programs if it is possible
gerard
Here's an example (I can't get the "code" tag to work, so there's no indententation):
$ cat stack.f90
subroutine print_my_stack()
interface
function printstack(fd)
bind(c) printstack
integer, value :: fd
integer printstack
end function printstack
end interface
integer n
n = printstack(1)
print *, "printstack returned ", n
end subroutine print_my_stack
call print_my_stack()
end
$ f90 stack.f90
$ a.out
.../a.out:print_my_stack_+0xd
.../a.out:MAIN_+0x8
.../a.out:main+0x45
.../a.out:_start+0x7d
printstack returned 0
$