From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rock.gnat.com (rock.gnat.com [205.232.38.15]) by sourceware.org (Postfix) with ESMTP id 6DBF7385E830 for ; Thu, 19 Mar 2020 13:54:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6DBF7385E830 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey@adacore.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 37AB511690D; Thu, 19 Mar 2020 09:54:46 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com 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 TJ+g8YR48VDc; Thu, 19 Mar 2020 09:54:46 -0400 (EDT) Received: from murgatroyd (97-118-117-21.hlrn.qwest.net [97.118.117.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id CD8AE11676B; Thu, 19 Mar 2020 09:54:45 -0400 (EDT) From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] Fix Ada val_print removal regression References: <20200317180034.26934-1-tromey@adacore.com> <6a432b2a-4ae9-101d-32c3-efee7da031d1@simark.ca> X-Attribution: Tom Date: Thu, 19 Mar 2020 07:54:45 -0600 In-Reply-To: <6a432b2a-4ae9-101d-32c3-efee7da031d1@simark.ca> (Simon Marchi's message of "Tue, 17 Mar 2020 21:31:38 -0400") Message-ID: <874kuksb4q.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=0.5 required=5.0 tests=JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=no 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: Thu, 19 Mar 2020 13:54:47 -0000 Simon> While checking this, I noticed that the `struct value *` Simon> parameters of print_field_values and print_variant_part appear to Simon> be unnecessary. They are only passed recursively, but never Simon> actually used. Thanks Simon> But most importantly, I was thinking that this Simon> ada_val_print_struct_union function looked like it was accepting Simon> a decomposed struct value, much like the API that you have Simon> removed. Would it work and be good to change it to work more Simon> with `struct value`s? It seems to me like this bug would have Simon> been avoided. Yeah. The val_print removal series neglected a few spots. I will try to see if this one can be easily changed. Tom