Debugging modules

Hello,

is debugging of modules supported in current version of dbx and f95 for linux?

Sample program:

modul.f90:

MODULE modul

integer,parameter:: KND=KIND(1.)

CONTAINS

real(KND) function F(x)

real(KND) X

F=SIN(X)+COS(X)

end function

END MODULE modul

main.f90:

program MAIN

use modul

real(KND) Y

Y=1.

Y=F(Y)

write (*,*) Y

end program

compilation:

lada@spiranthes:~/f/test> f90 -g modul.f90 main.f90 -o Sun-i386-Linux/test

modul.f90:

main.f90:

Linking:

dbx output:

(dbx) cd /home/lada/f/test/Sun-i386-Linux

(dbx) debug /home/lada/f/test/Sun-i386-Linux/test

Reading test

Reading ld-linux.so.2

Reading libfui.so

Reading libfsu.so

Reading libpthread.so.0

Reading libmtsk.so.1

Reading libm.so.6

Reading libc.so.6

Reading librt.so.1

Reading libdl.so.2

(dbx) cd /home/lada/f/test/Sun-i386-Linux

(dbx) stop at "/home/lada/f/test/modul.f90":13

dbx: no executable code at line "modul.f90":13

(dbx) stop at "/home/lada/f/test/modul.f90":13

dbx: no executable code at line "modul.f90":13

(dbx) stop at "/home/lada/f/test/main.f90":15

(dbx) stop at "/home/lada/f/test/main.f90":15

(dbx) step

Running: test

(process id 8697)

(dbx) step

(dbx) step

(dbx) step

(dbx) step

execution completed, exit code is 0

(dbx)

I simply can't get into the module function. I'm using the latest build for linux on Suse Linux 10.0.

[1637 byte] By [Fuka] at [2007-11-26 9:52:54]
# 1

And yet a second thing, does Sun Studio Express 2 support profiling? I got these messages:

lada@spiranthes:~/f> sunf77 -p -g argord.for

NOTICE: Invoking /opt/sun/sunstudiomars/bin/f90 -f77 -ftrap=%none -p -g argord.for

argord.for:

MAIN argord:

f1:

f2:

f3:

f4:

/opt/sun/sunstudiomars/prod/lib/mcrt1.o: In function `_monstartup':

: undefined reference to `_alloc_profil_buf'

/opt/sun/sunstudiomars/prod/lib/mcrt1.o: In function `_monitor':

: undefined reference to `_countbase'

/opt/sun/sunstudiomars/prod/lib/mcrt1.o: In function `_monitor':

: undefined reference to `_numctrs'

/opt/sun/sunstudiomars/prod/lib/mcrt1.o: In function `_moncontrol':

: undefined reference to `_profiling'

/opt/sun/sunstudiomars/prod/lib/mcrt1.o: In function `_moncontrol':

: undefined reference to `_profiling'

/opt/sun/sunstudiomars/prod/lib/mcrt1.o: In function `_mcount':

: undefined reference to `__monitor_data'

Vladimir Fuka

Fuka at 2007-7-7 1:08:38 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
>does Sun Studio Express 2 support profiling?On Linux we support profile feedback optimization (-xprofile) but not prof/tcov profiling yet.Runtime support has not yet been ported.We might do it in one of the upcoming Express releases.regards,__Fedor.
SFV at 2007-7-7 1:08:38 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

We are in the process of converting the fortran debug information

from stabs to dwarf, which is required for Linux support. But

the conversion is not quite complete yet. The next version of

Sun Studio Express (in a month or two) should have much better

module support in dbx.

--chris

ChrisQuenelle at 2007-7-7 1:08:38 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4
Thanks for replies. On Solaris is debugging quite nice, so I'm looking forward to have it also on Linux. Vladimir
Fuka at 2007-7-7 1:08:38 > top of Java-index,Development Tools,Solaris and Linux Development Tools...