From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oYNhOZmEc2n9dBEAWB0awg (envelope-from ) for ; Fri, 23 Jan 2026 09:24:25 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=aarsen.me header.i=@aarsen.me header.a=rsa-sha256 header.s=MBO0001 header.b=SEbuBueU; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E74ED1E0AD; Fri, 23 Jan 2026 09:24:25 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 036D71E08D for ; Fri, 23 Jan 2026 09:24:25 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 591EC4BCA405 for ; Fri, 23 Jan 2026 14:24:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 591EC4BCA405 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=aarsen.me header.i=@aarsen.me header.a=rsa-sha256 header.s=MBO0001 header.b=SEbuBueU Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [80.241.56.161]) by sourceware.org (Postfix) with ESMTPS id 8251B4BCA425 for ; Fri, 23 Jan 2026 14:23:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8251B4BCA425 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8251B4BCA425 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=80.241.56.161 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769178238; cv=none; b=DiUMCuwJ+OKah3l8/qIk9w3mzJb1Sltj4hj1Ovl2ZMzkqkaT0RvGOo80LSGzkVWpQnafECOceMzyHkEAQ3+gy52rV2MewymdQBLFX9auisEa4wqTFO7o2rbAK4OMPgcvbgUzpPEQ0h21jPOAP2/0myDVroV7ckFZaGVH8xCL4c4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769178238; c=relaxed/simple; bh=qR1NoRn1W7zMlmB2Jyrav+0dE2WsSp8KnmHC4k6KsEg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=s5Bmk/beInNNNImmuU61oh7gEOvTJXpSi5i2AViXhgq7SeTBeMU9vLPJJDIEhvpneVxvoKzLwNxJ7A6/Yi9Bs/+D7XXuDWEbV1uzAKYvRvJsTO2sG170aIZ/eZueCNR7s3UgYpj67O/E79zPrGI9CM+wag0CSUqDcpIxQVJLx2U= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8251B4BCA425 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4dyKtL1hLfz9t1H; Fri, 23 Jan 2026 15:23:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1769178234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4z0rV3rkcw7H4tLu8BRVVefQ50GAoiB6zPvcc/LYU9k=; b=SEbuBueUt51f1I93+bgbuHJfqghLONgFWk8iyOH+ZvsV5FmSvUEvcOCftBvsGA4Dhc0DEy 1eWYdxd/oaDzLj99TQDHUK9wAZcRJb2pfjkDZ9ZM3bJHjgN0TyHW3w/6hXl8pc4oCP5rI1 4HZAuEOHz0BoXP+uco1zbR1KrpuUj37vqRTzz4Pd8SkRsdZZrNOnC80bRNXZGb2FLh61OV UkHIpuKIOr3CgolZBr451J3QfD71Zui/v6C33cBXwnwC/gQJ1wKUdQmIEq6wozjIDDxiKk pwd43GDD/r5BZQB6KBhPhdRNafFh9yy1txYJmMM0Wa+79ShxRbJhwHP0XwB2kw== From: =?utf-8?Q?Arsen_Arsenovi=C4=87?= To: Guinevere Larsen Cc: Eli Zaretskii , gdb-patches@sourceware.org Subject: Re: [PATCH v2] gdb: add tutorial command In-Reply-To: <19c407af-d5a8-49a0-9413-1d41d23c7fbf@redhat.com> References: <20260122202834.393095-1-guinevere@redhat.com> <86o6mkiz1o.fsf@gnu.org> <19c407af-d5a8-49a0-9413-1d41d23c7fbf@redhat.com> Date: Fri, 23 Jan 2026 15:23:50 +0100 Message-ID: <86jyx8pfux.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Guinevere Larsen writes: > Thanks for the review, I have made all the other changes you suggested! > > On 1/23/26 4:11 AM, Eli Zaretskii wrote: >>> +This means you can use it to prototype a solution without >>> +needing to recompile the inferior. Try it by setting 'vec' >>> +to a sorted array, like by using: >>> + print vec =3D {0, 1, 2, 3, 4, 5} >>> +and see how the program would end, with the "continue" >>> +command again. >> Isn't it strange to teach newbies that to assign a value to a >> variable, one must use the 'print' command? Why not "set variable"? > > It is a bit strange, I suppose, but "set" (like "call") are not things I = use > personally, when print can do the same and is one fewer command to rememb= er > > And this doubles as a warning that if the user calls a function that has > side-effects, those will also happen, and they aren't necessarily always > desired by the user... > > I can change it if you feel strongly that we should use "set" instead, bu= t I > find the side-effect explanation to be worth the unintuitiveness FWIW, I use both set and call to avoid printing the result values as appropriate (less screen real-estate, and fewer $n variables are my reasons). I think the text is fine as-is, but would personally mention it. I do think mentioning that 'print' computes an arbitrary expression including side effects is quite important, and if I was to mention call and set, I'd define them in terms of print for that reason (as the manual does). =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQECBAEWCgCqFiEE/uKz0RP8AKMWLWBhUsKUMB6ixJMFAmlzhHYbFIAAAAAABAAO bWFudTIsMi41KzEuMTEsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRGRUUyQjNEMTEzRkMwMEEzMTYyRDYw NjE1MkMyOTQzMDFFQTJDNDkzEBxhcnNlbkBhYXJzZW4ubWUACgkQUsKUMB6ixJMj uAD/YInVouqn/6LbA5jo82ApgIdhviYawG7tE82AvQKynTQA/1cDcSZWgvA2PVB8 n8H6hu+7MZ60Bk/DXknNwPX0/K4D =7sqC -----END PGP SIGNATURE----- --=-=-=--