Silverfrost Forums

Welcome to our forums

Go from running to debug mode

28 Sep 2009 2:21 #5064

Please remind one handy command which allows you go back and forth from run to debug and back when you want it. Old FTN77 had it.

The most annoying and useless property of debugger always was its window 'The application being debugged is running. Control will return to the debugger when either the breakpoint or error occur'. It must have the option of returning control to the user when he wants to. Now though if you click on it, the code goes into binary mode which is well known to scare to death of ordinary people.

28 Sep 2009 4:25 #5065

Now though if you click on it, the code goes into binary mode

Doesn't it do this when it pauses at a section of code which hasn't been compiled in debug mode. Dan, have you compiled all the code in debug mode?

29 Sep 2009 3:25 #5066

Yes, I know that. Things are that it not always works. Here is example

       use clrwin
       kRun=0
       dowhile (kRun==0)     
         call temporary_yield@
         call sleep1@(3.)
       enddo

       print*,'end'

	end
29 Sep 2009 7:47 #5067

If you are debugging and stepping over a call like temporary_yield@ or sleep1@ (with a long time interval) then the processor will go away and do that and finish the task before you get a chance to break into the processor.

Break points correspond to machine instructions that have to be programmed into the assembly code. Library routines do not have these optional break points. Otherwise the library would be much larger and runtimes much longer.

In theory we could supply debug versions of our libraries but we would also have to distribute the code and that is not an option. However, you would still have the same problem when, for example, sleep1@ calls the Windows API sleep function. At that point you would need a disassembly of the Windows DLL. Suffice to say we have to be satisfied with what we have.

30 Sep 2009 7:56 #5086

I hate this feature/bug all 20 years. It alone turned off probably 90 percents of potential FTN77/95 users (another factor of 10 was lost due to absolutely zero advertisement. Only that can explain why such excellent compiler was not known even in major fortran newsgroups)

I think the option should exist (and it must be default) never fall into assembler mode. It's a black hole. When you are there - you will not get out. In this example above the smarter debugger must know to avoid falling into library (or whatever program which does not have debugger information) and stop on fortran line with debugger information.

Please login to reply.