From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119424 invoked by alias); 23 Feb 2018 17:44:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 119411 invoked by uid 89); 23 Feb 2018 17:44:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Feb 2018 17:44:10 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 46F0440FB652; Fri, 23 Feb 2018 17:44:09 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id A19E82024CAB; Fri, 23 Feb 2018 17:44:08 +0000 (UTC) Subject: Re: [RFA v4] (Ada) Fix frame argument printing when using auto language mode To: Xavier Roirand , gdb-patches@sourceware.org References: <1519393613-22706-1-git-send-email-roirand@adacore.com> Cc: brobecker@adacore.com From: Pedro Alves Message-ID: <978a09f2-9201-a720-8828-14ad97c332bf@redhat.com> Date: Fri, 23 Feb 2018 17:44:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1519393613-22706-1-git-send-email-roirand@adacore.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-02/txt/msg00346.txt.bz2 On 02/23/2018 01:46 PM, Xavier Roirand wrote: > diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c > index a486919..5bfa16d 100644 > --- a/gdb/ada-valprint.c > +++ b/gdb/ada-valprint.c > @@ -33,6 +33,8 @@ > #include "objfiles.h" > #include "target-float.h" > > +extern const struct language_defn ada_language_defn; > + I think this is no longer needed. > static int print_field_values (struct type *, const gdb_byte *, > int, > struct ui_file *, int, > @@ -1208,7 +1210,7 @@ ada_val_print (struct type *type, > { > ada_val_print_1 (type, embedded_offset, address, > stream, recurse, val, options, > - current_language); > + language_def (language_ada)); ada_val_print_1 is only ever called here, which means that the language parameter could be eliminated and the hardcoding of language_ada pushed further down. Then ada_val_print_gnat_array is always passed language_ada too, etc., etc. Thanks, Pedro Alves