From: John Marshall <John.W.Marshall@glasgow.ac.uk>
To: Tom Tromey <tom@tromey.com>
Cc: Sandra Loosemore <sandra@codesourcery.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 3/3] Introduce a separate debug objfile iterator
Date: Wed, 15 May 2019 20:00:00 -0000 [thread overview]
Message-ID: <9FE09671-F329-40AB-A3B0-2C9652653339@glasgow.ac.uk> (raw)
In-Reply-To: <87y337yb55.fsf@tromey.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 6178 bytes --]
On 15 May 2019, at 16:45, Tom Tromey <tom@tromey.com> wrote:
> John> This broke compilation on macOS (tested on Mojave) with both Clang and GCC (9.1.0):
>
> Can you try the appended? I no longer have a macOS machine to test on.
Yes, that does the trick.
> This clashes with the normal gcc bug workaround that we do here; but I
> think on macOS that probably isn't worth worrying about.
Possibly a C-style for loop with explicit begin()/end() would work with both, but I'd agree that it's not worth worrying about for this Darwin-only file.
Thanks,
John
From gdb-patches-return-156121-listarch-gdb-patches=sources.redhat.com@sourceware.org Wed May 15 21:30:59 2019
Return-Path: <gdb-patches-return-156121-listarch-gdb-patches=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb-patches@sources.redhat.com
Received: (qmail 84626 invoked by alias); 15 May 2019 21:30:56 -0000
Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <gdb-patches.sourceware.org>
List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org>
List-Archive: <http://sourceware.org/ml/gdb-patches/>
List-Post: <mailto:gdb-patches@sourceware.org>
List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs>
Sender: gdb-patches-owner@sourceware.org
Delivered-To: mailing list gdb-patches@sourceware.org
Received: (qmail 84450 invoked by uid 89); 15 May 2019 21:30:39 -0000
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-26.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammyX-HELO: mail-wr1-f44.google.com
Received: from mail-wr1-f44.google.com (HELO mail-wr1-f44.google.com) (209.85.221.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 May 2019 21:30:21 +0000
Received: by mail-wr1-f44.google.com with SMTP id d9so1090628wrx.0 for <gdb-patches@sourceware.org>; Wed, 15 May 2019 14:30:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XvPLxkseq9ZRVEoNTfQ7AzN1P96nL0iuNe04dEQD+24=; b=S/yPUfo3nLPMMSq3MEpfr3pEzhgtKz0ZnfZZ7nbvJGhs0QTTz317g6YcfN4fxkUCGw mllxLml+ODial/v7Ai7lXwc6JR7GbaIcLglKdPej6m3/0AA4MfNRvhpeJ8eboKxBBttR /rUalG5+LWxblwc93OMaiyk2fUvq8ZAwH9jJXJtMsN2/mM9egXKPPPMLuu+uys9VpHyU C6wD8rMFR0bgkYJwRbJDcYJdu9arIDYgvgtzCf6qy2oeDJttOWDEOA9yjRv5E0S9iigq 3H+uIkkcPl3TrZJNhOi18K6jQyosLer2hbAm0/trCDXJeO7Rb+4gioeA3IgM5aztuBh9 YgvQ=Return-Path: <andrew.burgess@embecosm.com>
Received: from localhost (host86-180-62-212.range86-180.btcentralplus.com. [86.180.62.212]) by smtp.gmail.com with ESMTPSA id y132sm5675259wmd.35.2019.05.15.14.30.12 (version=TLS1_2 cipherìDHE-RSA-CHACHA20-POLY1305 bits%6/256); Wed, 15 May 2019 14:30:12 -0700 (PDT)
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: gdb-patches@sourceware.org
Cc: Andrew Burgess <andrew.burgess@embecosm.com>
Subject: [PUSHED] gdb/fortran: Add sizeof tests for indexed and sliced arrays
Date: Wed, 15 May 2019 21:30:00 -0000
Message-Id: <20190515213009.23058-1-andrew.burgess@embecosm.com>
In-Reply-To: <20181127183139.71170-12-sbasierski@pl.sii.eu>
References: <20181127183139.71170-12-sbasierski@pl.sii.eu>
X-IsSubscribed: yes
X-SW-Source: 2019-05/txt/msg00353.txt.bz2
Content-length: 2597
I've pushed the below.
Thanks,
Andrew
--
Add tests for calling sizeof on indexed and sliced arrays, and on
pointers to arrays. These are all things that currently work, but
were previously untested.
gdb/testsuite/ChangeLog:
* gdb.fortran/vla-sizeof.exp: Add tests of sizeof applied to
indexed and sliced arrays, and pointers to arrays.
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.fortran/vla-sizeof.exp | 23 +++++++++++++++++++----
2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.fortran/vla-sizeof.exp b/gdb/testsuite/gdb.fortran/vla-sizeof.exp
index 7f74a699d76..b6fdaebbf51 100644
--- a/gdb/testsuite/gdb.fortran/vla-sizeof.exp
+++ b/gdb/testsuite/gdb.fortran/vla-sizeof.exp
@@ -29,18 +29,33 @@ if ![runto_main] {
gdb_breakpoint [gdb_get_line_number "vla1-init"]
gdb_continue_to_breakpoint "vla1-init"
gdb_test "print sizeof(vla1)" " = 0" "print sizeof non-allocated vla1"
+gdb_test "print sizeof(vla1(3,2,1))" \
+ "no such vector element \\(vector not allocated\\)" \
+ "print sizeof non-allocated indexed vla1"
+gdb_test "print sizeof(vla1(3:4,2,1))" "slice out of range" \
+ "print sizeof non-allocated sliced vla1"
# Try to access value in allocated VLA
-gdb_breakpoint [gdb_get_line_number "vla2-allocated"]
-gdb_continue_to_breakpoint "vla2-allocated"
+gdb_breakpoint [gdb_get_line_number "vla1-allocated"]
+gdb_continue_to_breakpoint "vla1-allocated"
gdb_test "print sizeof(vla1)" " = 4000" "print sizeof allocated vla1"
+gdb_test "print sizeof(vla1(3,2,1))" "4" \
+ "print sizeof element from allocated vla1"
+gdb_test "print sizeof(vla1(3:4,2,1))" "800" \
+ "print sizeof sliced vla1"
# Try to access values in undefined pointer to VLA (dangling)
-gdb_breakpoint [gdb_get_line_number "vla1-filled"]
-gdb_continue_to_breakpoint "vla1-filled"
gdb_test "print sizeof(pvla)" " = 0" "print sizeof non-associated pvla"
+gdb_test "print sizeof(pvla(3,2,1))" \
+ "no such vector element \\(vector not associated\\)" \
+ "print sizeof non-associated indexed pvla"
+gdb_test "print sizeof(pvla(3:4,2,1))" "slice out of range" \
+ "print sizeof non-associated sliced pvla"
# Try to access values in pointer to VLA and compare them
gdb_breakpoint [gdb_get_line_number "pvla-associated"]
gdb_continue_to_breakpoint "pvla-associated"
gdb_test "print sizeof(pvla)" " = 4000" "print sizeof associated pvla"
+gdb_test "print sizeof(pvla(3,2,1))" "4" \
+ "print sizeof element from associated pvla"
+gdb_test "print sizeof(pvla(3:4,2,1))" "800" "print sizeof sliced pvla"
--
2.14.5
prev parent reply other threads:[~2019-05-15 20:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-09 18:11 [PATCH 0/3] some minor objfile iteration improvements Tom Tromey
2019-04-09 18:09 ` [PATCH 1/3] Remove some uses of "object_files" Tom Tromey
2019-04-10 1:49 ` Simon Marchi
2019-04-10 2:26 ` Tom Tromey
2019-04-10 2:50 ` Simon Marchi
2019-04-10 14:08 ` Tom Tromey
2019-04-09 18:09 ` [PATCH 2/3] Fix a couple of comments Tom Tromey
2019-04-10 1:51 ` Simon Marchi
2019-04-09 18:09 ` [PATCH 3/3] Introduce a separate debug objfile iterator Tom Tromey
2019-04-10 2:01 ` Simon Marchi
2019-04-10 14:08 ` Tom Tromey
2019-04-30 15:44 ` Sandra Loosemore
2019-04-30 15:51 ` Tom Tromey
2019-05-01 18:30 ` Tom Tromey
2019-05-03 18:23 ` Sandra Loosemore
2019-05-03 23:28 ` Tom Tromey
2019-05-15 9:45 ` John Marshall
2019-05-15 15:45 ` Tom Tromey
2019-05-15 20:00 ` John Marshall [this message]
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=9FE09671-F329-40AB-A3B0-2C9652653339@glasgow.ac.uk \
--to=john.w.marshall@glasgow.ac.uk \
--cc=gdb-patches@sourceware.org \
--cc=sandra@codesourcery.com \
--cc=tom@tromey.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