View previous topic :: View next topic |
Author |
Message |
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Tue May 21, 2019 1:56 pm Post subject: Strange behaviour of sdbg64 8.50: cannot set breakpoints ... |
|
|
When debugging the following program I observed some obscurities with respect to sdbg64 one of which is that I cannot set any breakpoint.
Program name: test_clearwin_info.for
Code: |
INCLUDE <WINDOWS.INS>
integer*2 IRXSCR0,IRXSCR1
IRXSCR0=CLEARWIN_INFO@('SCREEN_WIDTH')
IRXSCR1=CLEARWIN_INFO@('SCREEN_DEPTH')
write(*,*) 'IRXSCR0=',IRXSCR0,'IRXSCR1',IRXSCR1
end
|
Build comand: ftn95 test_clearwin_info.for /64 /debug /link
Debugging the executable built with the command mentioned above via sdbg64 8.50 results in following obscurities:
Source file test_clearwin_info.for is not shown
Entering CTRL-G + character "4" makes the debugger show the source file
Trying to set a breakpoint via F2 in line 3,4,5 results in error message "This line cannot be breakpointed"
Having selected menu Window, submenu Common Block makes sdbg64 hang
Using sdbg64 8.40 instead of 8.50 the source window is shown and I can set breakpoints in the lines mentioned above. However, the Common Block submenu behaves strange as described above. Moreove I observed that the Common Block submenu does not appear in the Window menu of the 32 bit version of sdbg (8.40 and 8.50).
Regards,
Dietmar |
|
Back to top |
|
|
Robert
Joined: 29 Nov 2006 Posts: 446 Location: Manchester
|
Posted: Fri May 24, 2019 4:19 pm Post subject: |
|
|
There is something very strange going on there. I can have it happen but it happens in various versions of sdbg64 - (8.50 and 8.30 for example). You say you can get it to work with version 8.40 but I couldn't.
More investigation required. |
|
Back to top |
|
|
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Mon May 27, 2019 2:38 pm Post subject: |
|
|
Robert,
I am a little bit confused now.
I could set breakpoints when using ftn95/sdbg64 version 8.30 and 8.40. I could not set breakpoints when using ftn95/sdbg64 version 8.50.
Regards,
Dietmar |
|
Back to top |
|
|
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Mon May 27, 2019 3:14 pm Post subject: |
|
|
Robert,
here one interesting observation:
in the DOS window which I used for building test_clearwin_info.exe with respect to ftn95 version 8.50, environment variable SOURCEPATH was not set. Hence I set it to the absolute path of the directory the source to be compiled was located in. Now when I executed
Code: |
sdbg64 test_clearwin_info.exe
|
the source was displayed as expected and I could set breakpoints.
This was even true if I "unset" SOURCEPATH again (via command "set SOURCEPATH=").
I have no explanation for this.
Regards,
Dietmar |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7931 Location: Salford, UK
|
Posted: Mon May 27, 2019 6:08 pm Post subject: |
|
|
Dietmar
It is quite possible that the value of SOURCEPATH is only relevant at compile time. I would need to check this out.
If it is then, once you have built your executable, the value of SOURCEPATH will make no difference. |
|
Back to top |
|
|
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Tue May 28, 2019 2:19 pm Post subject: |
|
|
However, still there is the problem that after my first build the problems metioned occurred for ftn95 and sdbg64 version 8.50 and not for 8.40, isn't it?
Regards,
Dietmar |
|
Back to top |
|
|
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Tue May 28, 2019 2:23 pm Post subject: |
|
|
I forgot to say in my last post that for version 8.40 variable SOURCEPATH has not been set before starting the first build.
Regards,
Dietmar |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7931 Location: Salford, UK
|
Posted: Fri May 31, 2019 4:51 pm Post subject: |
|
|
This behaviour is due to a regression in FTN95 at v8.50.
Please try the patched version of FTN95 that you can download via the following link. This is only for users of FTN95 v8.50.
https://www.dropbox.com/s/jy6qnixyoyv3plp/ftn95.zip?dl=0 |
|
Back to top |
|
|
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Mon Jun 03, 2019 3:15 pm Post subject: |
|
|
Paul,
thanks for the new version (8.51.0) of ftn95.exe. Now in sdbg64 the sources of my test sample are shown as expected without variable SOURCEPATH having been set and I can set breakpoints, as well.
There is still another question I raised which, however, is of minor importance to me: what about menu Window, submenu "Common Blocks" in sdbg64? I currently do not know its meaning and sdbg64 hangs if I select it.
Regards,
Dietmar |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7931 Location: Salford, UK
|
Posted: Mon Jun 03, 2019 6:57 pm Post subject: |
|
|
Dietmar
It does not work for me either. I will make a note of this. |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1888
|
Posted: Mon Jun 03, 2019 7:02 pm Post subject: |
|
|
Dietmar, in SDBG64 version 8.40.1, the Common Blocks pop up simply shows the range of addresses occupied by common blocks, if any are declared. After viewing that pop up, I have no problems with setting break points, stepping through the program and viewing variable values.
With most compilers, the addresses of common blocks may be obtained by telling the linker to produce a map file. SLINK64, on the other hand, will not assign addresses to common blocks at link time. Thus, being able to obtain the addresses of common blocks can be useful at run time when debugging at the assembler level.
PS: I can reproduce the problem described by Dietmar when I start a program that does not contain common blocks in SDBG64 8.40.1 and click on Window->Common Blocks.
Last edited by mecej4 on Tue Jun 04, 2019 12:19 pm; edited 1 time in total |
|
Back to top |
|
|
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
Posted: Tue Jun 04, 2019 10:04 am Post subject: |
|
|
mecej4, Paul,
thanks for the information.
Now I have introduced a common block to my test sample (adding line
Code: |
COMMON /SCREEN_INFO/ IRXSCR0,IRXSCR1
|
to the code of test_clearwin_info.for); compiling/linking with ftn95 (version 8.51.0) works and I can see the Common Block Window as described by mecej4. Now if I decomment the common block line in the code again and compile/link again, sdbg64 works with respect to the Common Block menu: no hanging any more if I select the common block menu. This makes me astonish, for the original application when comiled/linked for the first time had hung in this situation.
Regards,
Dietmar |
|
Back to top |
|
|
Robert
Joined: 29 Nov 2006 Posts: 446 Location: Manchester
|
Posted: Wed Jun 05, 2019 12:01 am Post subject: |
|
|
I think it is specific to programs that have no common blocks. |
|
Back to top |
|
|
ahalls_dsc
Joined: 12 Nov 2018 Posts: 16
|
Posted: Tue Jun 11, 2019 10:42 pm Post subject: |
|
|
Hi folks. I'm running v8.50 and am also unable to set breakpoints in sdbg64.
Aside from this, when I open the debugger, the code window is scrolled way down to line 1056 (when the f95 file itself has 322 lines).
I downloaded the FTN95.zip that Paul uploaded, recompiled, and upon running the program in the debugger, was met with an immediate crash.
I am inexperienced with FTN95 so would appreciate some guidance!
Alistair |
|
Back to top |
|
|
Robert
Joined: 29 Nov 2006 Posts: 446 Location: Manchester
|
|
Back to top |
|
|
|