From patchwork Wed Dec 4 16:41:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Simon Marchi (Code Review)" X-Patchwork-Id: 36515 Received: (qmail 27770 invoked by alias); 4 Dec 2019 16:41:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 27655 invoked by uid 89); 4 Dec 2019 16:41:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=HX-Languages-Length:3053 X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Dec 2019 16:41:24 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 93B0320422; Wed, 4 Dec 2019 11:41:22 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id 54E84209FE; Wed, 4 Dec 2019 11:41:11 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 0624428174; Wed, 4 Dec 2019 11:41:11 -0500 (EST) X-Gerrit-PatchSet: 3 Date: Wed, 4 Dec 2019 11:41:11 -0500 From: "Sourceware to Gerrit sync (Code Review)" To: Tom Tromey , gdb-patches@sourceware.org Cc: Simon Marchi Auto-Submitted: auto-generated X-Gerrit-MessageType: merged Subject: [pushed] Add bit-field test for scalar_storage_order X-Gerrit-Change-Id: I9e07d1b3e08e7c3384832b68ef286afe1d11479a X-Gerrit-Change-Number: 731 X-Gerrit-ChangeURL: X-Gerrit-Commit: 4139ff008829d716830d18e8cfa8cbf5c0ae7562 In-Reply-To: References: Reply-To: noreply@gnutoolchain-gerrit.osci.io, simon.marchi@polymtl.ca, tromey@sourceware.org, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Message-Id: <20191204164111.0624428174@gnutoolchain-gerrit.osci.io> Sourceware to Gerrit sync has submitted this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/731 ...................................................................... Add bit-field test for scalar_storage_order This adds a bit-field test for scalar_storage_order. gdb/testsuite/ChangeLog 2019-12-04 Tom Tromey * gdb.base/endianity.c (struct other) : New field. (main): Initialize it. * gdb.base/endianity.exp: Update. Change-Id: I9e07d1b3e08e7c3384832b68ef286afe1d11479a --- M gdb/testsuite/ChangeLog M gdb/testsuite/gdb.base/endianity.c M gdb/testsuite/gdb.base/endianity.exp 3 files changed, 11 insertions(+), 3 deletions(-) Approvals: Simon Marchi: Looks good to me, approved diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 3ba3692..2d45592 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2019-12-04 Tom Tromey + * gdb.base/endianity.c (struct other) : New field. + (main): Initialize it. + * gdb.base/endianity.exp: Update. + +2019-12-04 Tom Tromey + * gdb.ada/scalar_storage/storage.adb: New file. * gdb.ada/scalar_storage/pck.adb: New file. * gdb.ada/scalar_storage/pck.ads: New file. diff --git a/gdb/testsuite/gdb.base/endianity.c b/gdb/testsuite/gdb.base/endianity.c index 42ee9ae..17e5035 100644 --- a/gdb/testsuite/gdb.base/endianity.c +++ b/gdb/testsuite/gdb.base/endianity.c @@ -21,6 +21,7 @@ { int v; short w; + unsigned x : 3; float f; __complex__ float cplx; double d; @@ -42,7 +43,7 @@ int main (void) { - struct otherendian o = {3, 2, 23.5, 1.25 + 7.25i, 75}; + struct otherendian o = {3, 2, 7, 23.5, 1.25 + 7.25i, 75}; do_nothing (&o); /* START */ } diff --git a/gdb/testsuite/gdb.base/endianity.exp b/gdb/testsuite/gdb.base/endianity.exp index 4277c1f..e4f6bc3 100644 --- a/gdb/testsuite/gdb.base/endianity.exp +++ b/gdb/testsuite/gdb.base/endianity.exp @@ -25,11 +25,12 @@ return -1 } -gdb_test "print o" "= {v = 3, w = 2, f = 23.5, cplx = 1.25 \\+ 7.25 \\* I, d = 75}" \ +gdb_test "print o" "= {v = 3, w = 2, x = 7, f = 23.5, cplx = 1.25 \\+ 7.25 \\* I, d = 75}" \ "print o before assignment" gdb_test "print o.v = 4" "= 4" gdb_test "print o.w = 3" "= 3" +gdb_test "print o.x = 2" "= 2" gdb_test "print o.f = 1.5" "= 1.5" gdb_test "print o.d = -23.125" "= -23.125" @@ -40,5 +41,5 @@ gdb_test "x/x &o.v" "0x04000000" gdb_test "x/xh &o.w" "0x0300" -gdb_test "print o" "= {v = 4, w = 3, f = 1.5, cplx = 1.25 \\+ 7.25 \\* I, d = -23.125}" \ +gdb_test "print o" "= {v = 4, w = 3, x = 2, f = 1.5, cplx = 1.25 \\+ 7.25 \\* I, d = -23.125}" \ "print o after assignment"