From patchwork Wed Nov 27 18:48:01 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: 36312 Received: (qmail 60778 invoked by alias); 27 Nov 2019 18:48:24 -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 60503 invoked by uid 89); 27 Nov 2019 18:48:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit 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, 27 Nov 2019 18:48:05 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 6B2ED203AC; Wed, 27 Nov 2019 13:48:04 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [IPv6:2620:52:3:1:5054:ff:fe06:16ca]) by mx1.osci.io (Postfix) with ESMTP id 2AE4A2046F for ; Wed, 27 Nov 2019 13:48:01 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 0C44A28173 for ; Wed, 27 Nov 2019 13:48:01 -0500 (EST) X-Gerrit-PatchSet: 1 Date: Wed, 27 Nov 2019 13:48:01 -0500 From: "Tom Tromey (Code Review)" To: gdb-patches@sourceware.org Message-ID: Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange Subject: [review] Propagate endianity to subrange types X-Gerrit-Change-Id: I2998ab919dc28aeff097763c4242f9bfb90823a3 X-Gerrit-Change-Number: 730 X-Gerrit-ChangeURL: X-Gerrit-Commit: 9433ac9704185a7631716c09277db30ec4057456 References: Reply-To: tromey@sourceware.org, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/730 ...................................................................... Propagate endianity to subrange types A subrange type should inherit its endianity from its base type. gdb/ChangeLog 2019-11-27 Tom Tromey * gdbtypes.c (create_range_type): Inherit endianity from base type. Change-Id: I2998ab919dc28aeff097763c4242f9bfb90823a3 --- M gdb/ChangeLog M gdb/gdbtypes.c 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 58f7f46..590ad25 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2019-11-27 Tom Tromey + * gdbtypes.c (create_range_type): Inherit endianity + from base type. + +2019-11-27 Tom Tromey + * ada-lang.c (decode_constrained_packed_array) (ada_value_assign, value_assign_to_component): Update. * dwarf2loc.c (rw_pieced_value, access_memory) diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 31bfa47..c4e49ef 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -945,6 +945,9 @@ if (high_bound->kind == PROP_CONST && high_bound->data.const_val < 0) TYPE_UNSIGNED (result_type) = 0; + TYPE_ENDIANITY_NOT_DEFAULT (result_type) + = TYPE_ENDIANITY_NOT_DEFAULT (index_type); + return result_type; }