From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 26989387702B for ; Wed, 18 Mar 2020 01:31:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 26989387702B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 710301E5F9; Tue, 17 Mar 2020 21:31:39 -0400 (EDT) Subject: Re: [PATCH] Fix Ada val_print removal regression To: Tom Tromey , gdb-patches@sourceware.org References: <20200317180034.26934-1-tromey@adacore.com> From: Simon Marchi Message-ID: <6a432b2a-4ae9-101d-32c3-efee7da031d1@simark.ca> Date: Tue, 17 Mar 2020 21:31:38 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200317180034.26934-1-tromey@adacore.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US-large Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2020 01:31:40 -0000 On 2020-03-17 2:00 p.m., Tom Tromey wrote: > @@ -595,6 +595,7 @@ print_variant_part (struct type *type, int field_num, > > static int > print_field_values (struct type *type, const gdb_byte *valaddr, The comment of this function would need to be updated. While checking this, I noticed that the `struct value *` parameters of print_field_values and print_variant_part appear to be unnecessary. They are only passed recursively, but never actually used. But most importantly, I was thinking that this ada_val_print_struct_union function looked like it was accepting a decomposed struct value, much like the API that you have removed. Would it work and be good to change it to work more with `struct value`s? It seems to me like this bug would have been avoided. Simon