public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "Phil.M.Fischer at googlemail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug fortran/15326] New: Problem inspecting recursive Derived Data Type
Date: Sat, 30 Mar 2013 16:31:00 -0000	[thread overview]
Message-ID: <bug-15326-4717@http.sourceware.org/bugzilla/> (raw)

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.


             reply	other threads:[~2013-03-30 16:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-30 16:31 Phil.M.Fischer at googlemail dot com [this message]
2013-03-30 16:32 ` [Bug fortran/15326] " Phil.M.Fischer at googlemail dot com
2013-04-12 17:19 ` tromey at redhat dot com
2022-11-12 13:07 ` gnikit at duck dot com
2023-03-07 14:21 ` tromey at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-15326-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).