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 7A6AD3858D28 for ; Fri, 6 Jan 2023 21:38:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7A6AD3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [172.16.0.64] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (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 015B91E110; Fri, 6 Jan 2023 16:38:05 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1673041086; bh=i1pr982pROorkkykQeGTW4xgcgPzIlnbaeyzL1pb+rk=; h=Date:Subject:To:References:From:In-Reply-To:From; b=I4nSZ0sq7jpX7jvKgMbywy0kwDMYha9Kenr/uj2tuMUIETuL1k/RJZhUgUc/7vH3x vAfoiHADToI/OyJIz5Vc8yVkVOcXjDHb1pRcQ3LRnS/YZbg8DWdh8I/b2idbaqU1Wo EYsLDeq56zdIdXHMo053BNc4fPVeMGsAjlX7uwTI= Message-ID: <2e2d19cc-bf4e-4ac7-902f-4ad0a7348e5f@simark.ca> Date: Fri, 6 Jan 2023 16:38:05 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH 1/2] Implement some agent expressions for Ada Content-Language: fr To: Tom Tromey , gdb-patches@sourceware.org References: <20230104164452.1154744-1-tromey@adacore.com> <20230104164452.1154744-2-tromey@adacore.com> From: Simon Marchi In-Reply-To: <20230104164452.1154744-2-tromey@adacore.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > @@ -10659,6 +10672,21 @@ ada_wrapped_operation::evaluate (struct type *expect_type, > return result; > } > > +void > +ada_wrapped_operation::do_generate_ax (struct expression *exp, > + struct agent_expr *ax, > + struct axs_value *value, > + struct type *cast_type) > +{ > + std::get<0> (m_storage)->generate_ax (exp, ax, value, cast_type); > + > + struct type *type = value->type; > + if (ada_is_aligner_type (type)) > + error (_("Aligner types cannot be handled in agent expressions")); > + else if (find_base_type (type) != nullptr) > + error (_("Dynamic types cannot be handled in agent expressions")); Is it on purpose that you do these checks after calling generate_ax? I don't really understand the Ada bits, so I can't really comment more than that. Simon