Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: David Lecomber <david@streamline-computing.com>
To: Jim Blandy <jimb@redhat.com>
Cc: patches <gdb-patches@sources.redhat.com>
Subject: Re: [PATCH/RFA] PR gdb/648  (eval.c approval reqd)
Date: Fri, 27 Aug 2004 09:15:00 -0000	[thread overview]
Message-ID: <1093599149.26156.19.camel@cpc4-oxfd5-5-0-cust12.oxfd.cable.ntl.com> (raw)
In-Reply-To: <vt23c294fjg.fsf@zenia.home>

Hi Jim


On Fri, 2004-08-27 at 00:59, Jim Blandy wrote:
> In your original post, you said, "G77 puts things in row-major order".
> It looks to me as if G77 puts the *types* in row-major order (contrary
> to the Dwarf spec, which wants them in the order they appear in source
> code), but it locates the actual arrays in memory in column-major
> order:
[..]
> This shows that varying the leftmost index yields the smallest change
> in element address, which is column-major.  So the arrays are actually
> laid out correctly; it's just the types in the Dwarf 2 info that are
> wrong.

Yes -- I'm in agreement here, although I hadn't actually thought of that
before.  If that weren't the case, then it wouldn't be possible to link
g77 output with other compilers,..

> If that's all correct, then this patch is approved.

Good-o,

> It seems to me that there's a separate bug in f-valprint.c.  The
> output below is incorrect, right?  It's printed as a series of
> columns, not a series of rows.  Or is that what users of a Fortran
> debugger would expect?
> 
>     (gdb) p twodi
>     $1 = (( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
>     19, 20) ( 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32,
>     34, 36, 38, 40) ( 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42,
> [..]

A Fortran user would expect this like this, so it's not a bug.  Suppose
a Fortran-er is working with an array of 3-d points, for some finite
element application.  To ensure the x,y,z are in adjacent memory for
better cache behaviour, there'd be an array of REAL(3, 100000) -- which
when printed by GDB will produce a list of points (x, y, z). They'd want
that.

Cheers
David


  reply	other threads:[~2004-08-27  9:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-06 22:10 [PATCH/RFA] PR gdb/648 David Lecomber
2004-08-13 10:25 ` David Lecomber
2004-08-13 10:32   ` Michael Chastain
2004-08-13 22:14 ` Jim Blandy
2004-08-16 12:33   ` David Lecomber
2004-08-16 12:38   ` David Lecomber
2004-08-18 16:36     ` Jim Blandy
2004-08-20 13:37       ` [PATCH/RFA] PR gdb/648 (eval.c approval reqd) David Lecomber
2004-08-20 13:45         ` David Lecomber
2004-08-25  5:53         ` Jim Blandy
2004-08-25  7:24           ` David Lecomber
2004-08-27  0:00         ` Jim Blandy
2004-08-27  9:15           ` David Lecomber [this message]
2004-08-27 13:52             ` Andrew Cagney
2004-08-27 13:58               ` Michael Chastain
2004-08-27 14:14                 ` Andrew Cagney
2004-08-27 14:57                   ` Michael Chastain
2004-08-27 15:57                     ` Andrew Cagney
2004-08-27 16:15                       ` Michael Chastain
2004-08-30 14:17                         ` Andrew Cagney
2004-08-23 19:26       ` [PATCH/RFA] PR gdb/648 Andrew Cagney
2004-08-24 18:03         ` Jim Blandy
2004-08-15  8:19 ` Michael Chastain

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=1093599149.26156.19.camel@cpc4-oxfd5-5-0-cust12.oxfd.cable.ntl.com \
    --to=david@streamline-computing.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@redhat.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