From patchwork Mon Apr 28 19:43:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Brobecker X-Patchwork-Id: 733 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx23.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 02021360075 for ; Mon, 28 Apr 2014 12:43:50 -0700 (PDT) Received: by homiemail-mx23.g.dreamhost.com (Postfix, from userid 14314964) id B727E6353E56E; Mon, 28 Apr 2014 12:43:49 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx23.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx23.g.dreamhost.com (Postfix) with ESMTPS id 8A5CE6353E574 for ; Mon, 28 Apr 2014 12:43:49 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=XxKFcc/sMQp45vAj8uJmc15ZKip0n2XjKD6jFgWpGXRjG32IEKE80 X5fkFn5hrK/2raQJDNYKKOujSJieuFSXqKYWoWTP/G5UeSUCqjbICFnlryLELAhd +vkHo6JFXUO0eIWxeao/ZTroD4rSglg/b6kr3YfUZCt/0z44cQP3lc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; s=default; bh=3I5guJqksVHUmTOA8NI56QdijSo=; b=xp39BnEt9O4PB0hfoEKcbK8PnJ+7 djaFdVWezZ0Ea1zm3UE5T/zlUcywBBixrxluI/Jt0TV+gsf9lF50nBB+61dijz3L Rz1S0Vm8XshyJWebTuvCrfL+67Qx+8qQCuf0cJL96AlT+A3KaCQfjiDBkFDgMvJC OqBiRGwDW97W5qw= Received: (qmail 2034 invoked by alias); 28 Apr 2014 19:43:48 -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 2025 invoked by uid 89); 28 Apr 2014 19:43:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 28 Apr 2014 19:43:46 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 1B348116158 for ; Mon, 28 Apr 2014 15:43:45 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DaaToMYeMqoA for ; Mon, 28 Apr 2014 15:43:45 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 03C95116155 for ; Mon, 28 Apr 2014 15:43:45 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id D4A73E0487; Mon, 28 Apr 2014 15:43:44 -0400 (EDT) From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [pushed/Ada] Unnecessary XA type handling in ada_varobj_describe_simple_array_child Date: Mon, 28 Apr 2014 15:43:43 -0400 Message-Id: <1398714223-991-1-git-send-email-brobecker@adacore.com> X-DH-Original-To: gdb@patchwork.siddhesh.in ada-varobj.c::ada_varobj_describe_simple_array_child only ever gets called after all GNAT encodings have been applied to (parent_value, parent_type). So there is no point in redoing it partially by checking for parallel XA types again. gdb/ChangeLog: * ada-varobj.c (ada_varobj_describe_simple_array_child): Remove handling of parallel ___XA types. Tested on x86_64-linux, and pushed. Thanks, diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cd43f6e..f3f02e7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2014-04-28 Joel Brobecker + * ada-varobj.c (ada_varobj_describe_simple_array_child): Remove + handling of parallel ___XA types. + +2014-04-28 Joel Brobecker + * ada-lang.c (ada_evaluate_subexp) : Remove unnecessary second call to static_unwrap_type. diff --git a/gdb/ada-varobj.c b/gdb/ada-varobj.c index 3da6018..b9f83be 100644 --- a/gdb/ada-varobj.c +++ b/gdb/ada-varobj.c @@ -579,18 +579,12 @@ ada_varobj_describe_simple_array_child (struct value *parent_value, struct type **child_type, char **child_path_expr) { - struct type *index_desc_type; struct type *index_type; int real_index; gdb_assert (TYPE_CODE (parent_type) == TYPE_CODE_ARRAY); - index_desc_type = ada_find_parallel_type (parent_type, "___XA"); - ada_fixup_array_indexes_type (index_desc_type); - if (index_desc_type) - index_type = TYPE_FIELD_TYPE (index_desc_type, 0); - else - index_type = TYPE_INDEX_TYPE (parent_type); + index_type = TYPE_INDEX_TYPE (parent_type); real_index = child_index + ada_discrete_type_low_bound (index_type); if (child_name)