This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/15326] New: Problem inspecting recursive Derived Data Type


http://sourceware.org/bugzilla/show_bug.cgi?id=15326

             Bug #: 15326
           Summary: Problem inspecting recursive Derived Data Type
           Product: gdb
           Version: 7.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned@sourceware.org
        ReportedBy: Phil.M.Fischer@googlemail.com
    Classification: Unclassified


Hi all,

I am using GDB and GFortran within an Eclipse development environment. Right
now, i have come across an issue concerning GDB. This issue makes it impossible
for me to use GDB within Eclipse for the moment. So I tried to see if I can
reproduce this issue. I am running Eclipse on a 32 bit Windows Vista Computer
as well as on 64bit Windows 8 Machine. I am using GFortran and GDB with the
latest MinGW installation. Both computers show the same issues. So here is what
happens. 

Step 1: I have code that contains a Derived Type for a linked list:

1 : PROGRAM GDB_Fail
2 :
3 :    IMPLICIT NONE
4 :
5 :    TYPE :: Test_Node
6 :        TYPE(Test_Node), POINTER :: next => null()
7 :        INTEGER data
8 :    END TYPE
9 :
10:    TYPE(Test_Node) :: node_test
11:
12:    node_test%data = 4
13:
14: END PROGRAM GDB_Fail

Step 2: Setting a breakpoint at line 12
(gdb) br 12

Step 3: Run the program
Step 4: Inspect the node on its next item
(gdb) print node_test%next
PTR TO -> (     Type test_node
PTR TO -> (         Type test_node
PTR TO -> (             Type test_node
PTR TO -> (                 Type test_node
PTR TO -> (                     Type test_node
PTR TO -> (                         Type test_node
PTR TO -> (                             Type test_node
PTR TO -> (                                 Type test_node
PTR TO -> (                                     Type test_node
PTR TO -> (                                         Type test_node
PTR TO -> (                                             Type test_node
PTR TO -> (                                                 Type test_node
PTR TO -> (                                                     Type test_node

This is the point where it fails and GDB apparently tries to evaluate the next
pointer of the next pointer of the next pointer. The only way to stop is
Ctrl-C. The output is exactly what I get from within Eclipse as well.

The same program written in C can be debugged without any trouble. 

For me it looks like there is an issue with GDB inspecting recursive Derived
Types. 

Cheers

Phil

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]