public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/11104] New: gdb 7.0 does not print two dimensional Fortran arrays correctly.
@ 2009-12-17 18:42 at_gdb at mathalacarte dot com
  2010-01-26 16:09 ` [Bug fortran/11104] " at_gdb at mathalacarte dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: at_gdb at mathalacarte dot com @ 2009-12-17 18:42 UTC (permalink / raw)
  To: gdb-prs

I was not able to find how to find the triplets requested when running on a
Gentoo Linux system.  Running uname -a gives
Linux mon 2.6.32-gentoo #1 SMP Thu Dec 3 13:59:59 PST 2009 x86_64 AMD
Opteron(tm) Processor 242 AuthenticAMD GNU/Linux

Try this Fortran code
====
      program test
c   Testing gdb for printing arrays
      double precision C(4,4)
      do J = 1, 4
        do I = 1, 4
          C(I,J) = dble(I+J)
        end do
      end do
      print '(''C(1,1), C(4,4):'', 1P, 2E12.5)', C(1,1), C(4,4)
      stop
      end
======
gfortran -ggdb -o test test.f
gdb test
b 9
r
p c(1,2)

And I get

no such vector element

-- 
           Summary: gdb 7.0 does not print two dimensional Fortran arrays
                    correctly.
           Product: gdb
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: at_gdb at mathalacarte dot com
                CC: gdb-prs at sourceware dot org


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/11104] gdb 7.0 does not print two dimensional Fortran arrays correctly.
  2009-12-17 18:42 [Bug fortran/11104] New: gdb 7.0 does not print two dimensional Fortran arrays correctly at_gdb at mathalacarte dot com
@ 2010-01-26 16:09 ` at_gdb at mathalacarte dot com
  2010-05-31  9:49 ` fenixk19 at mail dot ru
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: at_gdb at mathalacarte dot com @ 2010-01-26 16:09 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From at_gdb at mathalacarte dot com  2010-01-26 16:09 -------
Just tried gdb-7.0.1 on my gentoo system, and it has the same problem, this time 
noticed for a one-dimensional array.  The error message is the same.  Version 6.8 
works.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/11104] gdb 7.0 does not print two dimensional Fortran arrays correctly.
  2009-12-17 18:42 [Bug fortran/11104] New: gdb 7.0 does not print two dimensional Fortran arrays correctly at_gdb at mathalacarte dot com
  2010-01-26 16:09 ` [Bug fortran/11104] " at_gdb at mathalacarte dot com
@ 2010-05-31  9:49 ` fenixk19 at mail dot ru
  2010-09-12 14:43 ` aburgess at broadcom dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: fenixk19 at mail dot ru @ 2010-05-31  9:49 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From fenixk19 at mail dot ru  2010-05-31 09:49 -------
Confirming on version 7.1

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
            Version|7.0                         |7.1


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/11104] gdb 7.0 does not print two dimensional Fortran arrays correctly.
  2009-12-17 18:42 [Bug fortran/11104] New: gdb 7.0 does not print two dimensional Fortran arrays correctly at_gdb at mathalacarte dot com
  2010-01-26 16:09 ` [Bug fortran/11104] " at_gdb at mathalacarte dot com
  2010-05-31  9:49 ` fenixk19 at mail dot ru
@ 2010-09-12 14:43 ` aburgess at broadcom dot com
  2010-09-12 14:53 ` aburgess at broadcom dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: aburgess at broadcom dot com @ 2010-09-12 14:43 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From aburgess at broadcom dot com  2010-09-12 14:43 -------
Created an attachment (id=4976)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4976&action=view)
Proposed patch

Fortran multi-dimensional arrays are of type:
   ARRAY of ( ARRAY of ( BASETYPE ) )
Nested to the required depth.
The code used to fetch a single element out of an array could previously only
handle (ARRAY of BASETYPE), and so before calling this we would modify the type
of the array. However, this was leading to other problems when we try to bounds
check the array access.

This patch changes the array access code so that is can peel off all the layers
of ARRAY of ARRAY of ... to get to the BASETYPE.


-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/11104] gdb 7.0 does not print two dimensional Fortran arrays correctly.
  2009-12-17 18:42 [Bug fortran/11104] New: gdb 7.0 does not print two dimensional Fortran arrays correctly at_gdb at mathalacarte dot com
                   ` (2 preceding siblings ...)
  2010-09-12 14:43 ` aburgess at broadcom dot com
@ 2010-09-12 14:53 ` aburgess at broadcom dot com
  2010-09-16  8:03 ` aburgess at broadcom dot com
  2010-09-16  8:45 ` aburgess at broadcom dot com
  5 siblings, 0 replies; 7+ messages in thread
From: aburgess at broadcom dot com @ 2010-09-12 14:53 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From aburgess at broadcom dot com  2010-09-12 14:53 -------
Created an attachment (id=4977)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4977&action=view)
Test for this issue.

The multi-dim.tar.bz2 contains a new test that should cover this issue. It
would need adding to gdb/testsuite/gdb.fortran. The only thing is, I've not
been able to run any of the Fortran tests myself as I'm struggling to get them
to compile, I don't know if this is just my setup or a general issue.
I'm working with gdb-7.2 & gcc 4.4.3.

I've checked that this new test works using a dirty hack :) but someone who can
actually get the Fortran tests running should check this works correctly before
it's committed into the tree.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/11104] gdb 7.0 does not print two dimensional Fortran arrays correctly.
  2009-12-17 18:42 [Bug fortran/11104] New: gdb 7.0 does not print two dimensional Fortran arrays correctly at_gdb at mathalacarte dot com
                   ` (3 preceding siblings ...)
  2010-09-12 14:53 ` aburgess at broadcom dot com
@ 2010-09-16  8:03 ` aburgess at broadcom dot com
  2010-09-16  8:45 ` aburgess at broadcom dot com
  5 siblings, 0 replies; 7+ messages in thread
From: aburgess at broadcom dot com @ 2010-09-16  8:03 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From aburgess at broadcom dot com  2010-09-16 08:03 -------
Created an attachment (id=4986)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4986&action=view)
Updated patch

This should apply to the current CVS head.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #4976 is|0                           |1
           obsolete|                            |


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/11104] gdb 7.0 does not print two dimensional Fortran arrays correctly.
  2009-12-17 18:42 [Bug fortran/11104] New: gdb 7.0 does not print two dimensional Fortran arrays correctly at_gdb at mathalacarte dot com
                   ` (4 preceding siblings ...)
  2010-09-16  8:03 ` aburgess at broadcom dot com
@ 2010-09-16  8:45 ` aburgess at broadcom dot com
  5 siblings, 0 replies; 7+ messages in thread
From: aburgess at broadcom dot com @ 2010-09-16  8:45 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From aburgess at broadcom dot com  2010-09-16 08:45 -------
Created an attachment (id=4987)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4987&action=view)
Updated testcase

Finally got the Fortran tests running, slight update to the test case.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #4977 is|0                           |1
           obsolete|                            |


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-09-16  8:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-17 18:42 [Bug fortran/11104] New: gdb 7.0 does not print two dimensional Fortran arrays correctly at_gdb at mathalacarte dot com
2010-01-26 16:09 ` [Bug fortran/11104] " at_gdb at mathalacarte dot com
2010-05-31  9:49 ` fenixk19 at mail dot ru
2010-09-12 14:43 ` aburgess at broadcom dot com
2010-09-12 14:53 ` aburgess at broadcom dot com
2010-09-16  8:03 ` aburgess at broadcom dot com
2010-09-16  8:45 ` aburgess at broadcom dot com

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).