View previous topic :: View next topic |
Author |
Message |
dgurok
Joined: 26 May 2011 Posts: 66
|
Posted: Fri May 27, 2011 12:06 pm Post subject: Problem with sdbg |
|
|
Does sdbg support fortran77 code without restrictions?
My test programs work with fortran77 and with fortran95 without sdbg correctly but when I try to debug the code/program the debugger behaves strange.
I have problems always when I use more then one subroutine in my library file...
My Errors in sdbg:
Call Stack/Status - Access violation *Unknown*
or
Call Stack/Status
Privileged instruction
_scc_lib_version
WSF2___
*Unknown�
or
FortranStartup without any source code
My Code ist very simple:
Main:
Code: | PROGRAM TEST
C
INTEGER*2
*IDUM
C
WRITE(*,*)'Start: Program'
CALL MYSUB2()
CALL MYSUB3()
IDUM=32
CALL MYTRV(IDUM)
C
WRITE(*,*)'End: Program'
END |
LIB
Code: |
SUBROUTINE MYSUB2()
C
INTEGER*4
*I,J
C
WRITE(*,*)'Start: MYSUB2'
J=4
I=J*J
C
WRITE(*,*)'End: MYSUB2'
RETURN
END
C
C
SUBROUTINE MYSUB3()
C
INTEGER*4
*I,J
C
WRITE(*,*)'Start: MYSUB3'
J=4
I=J*J
C
WRITE(*,*)'End: MYSUB3'
RETURN
END
C
C
SUBROUTINE MYTRV (IDUM)
C
INTEGER*2 IDUM
C
C CHARACTER CTRRV*1
C
C COMMON /COMIRV/ CTRRV
C
C CTRRV=CHAR(IDUM)
C
WRITE(*,*)'Start: MYTRV'
IDUM=2
WRITE(*,*)'End: MYTRV'
RETURN
END
|
Linkfile
Code: |
lo test3.obj
lo sub3.lib
file test3.exe |
Batch
Code: |
@echo off
ftn95 test3.for /debug/windows
ftn95 sub3.for /debug /MKLIB
slink test3.lnk
sdbg test3.exe |
 |
|
Back to top |
|
 |
dgurok
Joined: 26 May 2011 Posts: 66
|
Posted: Fri May 27, 2011 1:24 pm Post subject: |
|
|
I think the /MKLIB option created the problem.
My library used and linked as obj-file works in sdbg fine.
Im using slink with -archive and -addobj to create my librarys and it works better now. |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Fri May 27, 2011 1:55 pm Post subject: |
|
|
If you look up /MKLIB in the help it says :
/MKLIB causes FTN95 to call the Salford library manager called SLIM.
Objects in the resulting static library may work correctly with the debugger SDBG.
The use of SLIM objects with SDBG is not supported.
I'm not sure what that all means ??
It appears that "may" could also imply "may not"
I've never used SLIM
You appear to be better off to use SLINK using the commands :
archive xxx.lib
addobj xxx.obj
addobj yyy.obj
file
I tend not to put routines into a library that I am debugging |
|
Back to top |
|
 |
dgurok
Joined: 26 May 2011 Posts: 66
|
Posted: Fri May 27, 2011 2:30 pm Post subject: |
|
|
Yes, you are right, thanks a lot  |
|
Back to top |
|
 |
|