Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Oracle Developer Studio 12.6 can't debug a Fortran program with intensively using of Fortran pointers

135 views
Skip to first unread message

dangtruo...@gmail.com

unread,
Jun 9, 2021, 11:13:36 AM6/9/21
to
I have Oracle Developer Studio 12.6 in a Linux VM (VM-Ware). I install openjdk 8 and start Oracle Developer Studio successfully. The IDE can compiler and run my code, even produce same result with Intel OneAPI and gfortran (both of those are on my Windows 10 machine).

However, when I start setting breakpoint and debug my Fortran program, Oracle IDE always run to the end of the program. Here is the repository of my complete program: https://github.com/truongd8593/ClassicalDataStructuresF95

Am I configure anything wrong? My code can be debugged by Intel debugger (Visual Studio 2019 integration), and Code::Blocks 20.03 (gdb debugger, MinGW gfortran)

gah4

unread,
Jun 9, 2021, 5:09:29 PM6/9/21
to
There seem to be 11 different programs. (Or different algorithms.)
Do all of them have this problem?

Otherwise, first guess is an optimization is avoiding the place where you thing the breakpoint is set.

dangtruo...@gmail.com

unread,
Jun 9, 2021, 8:10:20 PM6/9/21
to
There is only 1 program in the file simple_linked_list.f90. The others are subroutines for algorithms. When the IDE compiles code, I saw it has -g flag.

gah4

unread,
Jun 9, 2021, 8:52:45 PM6/9/21
to
On Wednesday, June 9, 2021 at 5:10:20 PM UTC-7, dangtruo...@gmail.com wrote:

(snip)

> > > However, when I start setting breakpoint and debug my Fortran program, Oracle IDE always run to the end of the program. Here is the repository of my complete program: https://github.com/truongd8593/ClassicalDataStructuresF95

(snip)
> There is only 1 program in the file simple_linked_list.f90. The others are subroutines for algorithms. When the IDE compiles code, I saw it has -g flag.

Usually when people say "program", that includes all subroutines needed.

And yes you want -g for use with the debugger. (And many always put in -g)

So, you are setting breakpoints inside simple_linked_list and they aren't working?

Did you try breakpoints in subroutines?

More often than use breakpoints and debuggers, I just put pause statements in
to see where the program is getting to, and step by step what it is doing.

Yesterday I found a bug in a program that is almost 60 years old that way.
(Though it should have been faster, as gfortran did give a warning for it.)

I have in the past found funny things with the way breakpoints work in
compiled Fortran code. One I ran into many years ago, is related to ENTRY
statements.

In any case, more details on what it does, and doesn't do, makes it easier
for others to help.



dangtruo...@gmail.com

unread,
Jun 10, 2021, 11:12:46 AM6/10/21
to
I discover that Oracle Solaris Studio 12.4 can debug line by line my Fortran 95 code, as in the case of Intel OneAPI and Code::Blocks.

It can be observed that in Oracle 12.4 I use GNU configuration, which means Oracle 12.4 does not use their dbx debugger. It simply do the same task as Code::Blocks, which is a GUI for GDB debugger.

dangtruo...@gmail.com

unread,
Jun 11, 2021, 11:24:55 AM6/11/21
to
However Oracle Solaris Studio 12.4 does not have support for Fortran 2003, which is definitely a drawback comparing to its successor 12.6 :(

Nilesh Kumar

unread,
Jun 15, 2021, 2:16:08 PM6/15/21
to
0 new messages