replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Problem with sdbg
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with sdbg

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
dgurok



Joined: 26 May 2011
Posts: 66

PostPosted: Fri May 27, 2011 12:06 pm    Post subject: Problem with sdbg Reply with quote

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
View user's profile Send private message
dgurok



Joined: 26 May 2011
Posts: 66

PostPosted: Fri May 27, 2011 1:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Fri May 27, 2011 1:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
dgurok



Joined: 26 May 2011
Posts: 66

PostPosted: Fri May 27, 2011 2:30 pm    Post subject: Reply with quote

Yes, you are right, thanks a lot Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group