Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Andrew Burgess" <aburgess@broadcom.com>
To: "Mathew Yeates" <mat.yeates@gmail.com>
Cc: "Jan Kratochvil" <jan.kratochvil@redhat.com>,
	"gdb@sourceware.org" <gdb@sourceware.org>
Subject: RE: multidimensional fortran arrays
Date: Tue, 14 Sep 2010 07:32:00 -0000	[thread overview]
Message-ID: <89AE14E37D740B4796DC14566DF6325ECB7E0D56CC@SJEXCHCCR02.corp.ad.broadcom.com> (raw)
In-Reply-To: <AANLkTimB-ui=92xdyKsapzEj2SKDABMF5fqmw=7d2qqK@mail.gmail.com>

> On Tue, Sep 14, 2010 at 00:14, Mathew Yeates <mat.yeates@gmail.com>
> 
> uh oh. Doesn't seem to work for dimensions greater than 2.

Could you attach a test program, steps to compile, and the gdb commands and output please.
The following test program:

program a
  integer :: foo1 (2)
  integer :: foo2 (2,3)
  integer :: foo3 (2,3,4)
  integer :: foo4 (2,3,4,5)
  integer :: foo5 (2,3,4,5,6)
  integer :: foo6 (2,3,4,5,6,7)
  foo1 (:) = 10
  foo2 (:, :) = 10
  foo3 (:, :, :) = 10
  foo4 (:, :, :, :) = 10
  foo5 (:, :, :, :, :) = 10
  foo6 (:, :, :, :, :, :) = 10
  foo1 (2) = 20
  foo2 (2,3) = 20
  foo3 (2,3,4) = 20
  foo4 (2,3,4,5) = 20
  foo5 (2,3,4,5,6) = 20
  foo6 (2,3,4,5,6,7) = 20
  foo1 (2) = 20 ! Stop on line 20
end

Behaves like this with a patched gdb:

Reading symbols from /home/andrew/gdb-bug/myprog.x...done.
(gdb) b 20
Breakpoint 1 at 0x8048847: file a.f90, line 20.
(gdb) r
Starting program: /home/andrew/gdb-bug/myprog.x 

Breakpoint 1, a () at a.f90:20
20	  foo1 (2) = 20 ! Stop on line 20
 (gdb) p foo6(2,3,4,5,6,7)
$3 = 20
(gdb) p foo1(2)
$4 = 20
(gdb)


So I suspect we're trying to do different things.

Cheers,

Andrew


  reply	other threads:[~2010-09-14  7:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-02 17:29 Mathew Yeates
2010-09-03  5:47 ` Jan Kratochvil
2010-09-07  4:34   ` Mathew Yeates
2010-09-07 22:19     ` Andrew Burgess
2010-09-09 16:37       ` Mathew Yeates
2010-09-13 23:14         ` Mathew Yeates
2010-09-14  7:32           ` Andrew Burgess [this message]
2010-09-15 17:45           ` Tom Tromey

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=89AE14E37D740B4796DC14566DF6325ECB7E0D56CC@SJEXCHCCR02.corp.ad.broadcom.com \
    --to=aburgess@broadcom.com \
    --cc=gdb@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=mat.yeates@gmail.com \
    /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