Article View: gnu.gdb.bug
Article #1307Re: problem printing equivalenced fortran arrays in linux
From: Michael Chastain
Date: Fri, 23 Jul 2004 21:37
Date: Fri, 23 Jul 2004 21:37
46 lines
2561 bytes
2561 bytes
Hello rubin,
I am working through the bug reports from bug-gdb@gnu.org and I
just got to your message from February 2004. I apologize for
the five month delay.
I tried your program:
program equiv
dimension i1(10),i2(10)
equivalence (i1(1),i2(1))
i1(1) = 11
i2(2) = 22
i11 = i1(1)
i22 = i2(2)
c Put breakpoint at next line before using print in debug
stop
end
I compiled this on native i686-pc-linux-gnu, red hat linux 8.0,
with g77 3.3.4 and g77 3.4.1. The command line is:
g77 -gdwarf-2 rubin.f
Then I debugged a.out with gdb 6.1.1. I put a breakpoint on
the 'stop' line and printed the values:
(gdb) print i11
$1 = 11
(gdb) print i22
$2 = 22
(gdb) print i1(1)
$3 = 11
(gdb) print i1(2)
$4 = 22
(gdb) print i2(1)
$5 = 11
(gdb) print i2(2)
$6 = 22
So this works with the current released versions of gcc and gdb.
If you have any questions I'd be happy to help.
Michael C
GDB QA Guy
Technical Details
Message-ID:
<mailman.1289.1090618791.1960.bug-gdb@gnu.org>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mailReferences:
<000801c3f85d$d9a63020$5dce08d5@trubin>Show Full Headers
Complete Article Headers
X-Google-Thread: f5053,92196cdd0f7a7c62,start X-Google-Attributes: gidf5053,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail From: Michael Chastain <mec.gnu@mindspring.com> Newsgroups: gnu.gdb.bug Subject: Re: problem printing equivalenced fortran arrays in linux Date: Fri, 23 Jul 2004 17:37:22 -0400 Lines: 48 Sender: mec.gnu@mindspring.com Approved: bug-gdb@gnu.org Message-ID: <mailman.1289.1090618791.1960.bug-gdb@gnu.org> References: <000801c3f85d$d9a63020$5dce08d5@trubin> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.Stanford.EDU 1090618611 22003 199.232.76.165 (23 Jul 2004 21:36:51 GMT) X-Complaints-To: news@news.stanford.edu To: trubin@zahav.net.il, bug-gdb@gnu.org Envelope-to: bug-gdb@gnu.org In-Reply-To: <000801c3f85d$d9a63020$5dce08d5@trubin> User-Agent: nail 10.8 6/28/04 X-BeenThere: bug-gdb@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GDB, the GNU debugger" <bug-gdb.gnu.org> List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/pipermail/bug-gdb> List-Post: <mailto:bug-gdb@gnu.org> List-Help: <mailto:bug-gdb-request@gnu.org?subject=help> List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=subscribe>