From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id TRqjOGGCc2n2chEAWB0awg (envelope-from ) for ; Fri, 23 Jan 2026 09:14:57 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=EKCo2zxB; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D8A931E0AD; Fri, 23 Jan 2026 09:14:57 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE, 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 2726F1E08D for ; Fri, 23 Jan 2026 09:14:57 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 9A8CA4BC89BC for ; Fri, 23 Jan 2026 14:14:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A8CA4BC89BC Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=EKCo2zxB Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 97B4D4BA2E2B for ; Fri, 23 Jan 2026 14:14:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 97B4D4BA2E2B Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 97B4D4BA2E2B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769177670; cv=none; b=LQsndS89rZxsq64qBFH8BCAp07LG0bpWhLgT5GUcfM7z1/krCQRiISJ+4W+tL5r4zs740h+ETEUIFxiIuB1qsbffzxSx001jVNUpAai5aHjB2a33E+ZfASuxP8u9lLGmK8xRojjEOuH3dIys+ObGPN0QQs3vZoPJiwXb5o+SZSM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769177670; c=relaxed/simple; bh=QrFxdi2jHFg+NIkX7WZhXv0qc7bWL1mjIiCzlNPkx68=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=n08c19+ByuL350rKRVnIVTeRrzDlNW0RVzJnQZHuoZF1+jcPrloxlveoeIRAMhTHVwZNlggEI26WglTmPald9/wW7SEHHWqQjzoklcp19ealhxoEY8TI0KwOc/AVmBr+vT4rAb1rEX5txRcyYpeHumpLfi8jhMqJtqUonbXWVGM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97B4D4BA2E2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769177670; 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=TXQhTWO7RPowRd/dcCZASPzpqIXJqi0mO8i2APjtYno=; b=EKCo2zxBk+KfhUKrZi6EO6ljHpDfHzXbrnQ7pplPvzknM6tIk1sOuZhMc5VxkMXrs+EMxG /ufD9QSoRi8qCDcQIavEl6PfW11Hk+ctk2VWN5hoEFIPLmxncVt4u+JNG49rb2cmZIFFL6 AmZsIdpIq7u5g3azr9pf6QCVlKTwJ5g= Received: from mail-dy1-f200.google.com (mail-dy1-f200.google.com [74.125.82.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-638-saOl_My9OdS3atM3UsFMaA-1; Fri, 23 Jan 2026 09:14:28 -0500 X-MC-Unique: saOl_My9OdS3atM3UsFMaA-1 X-Mimecast-MFC-AGG-ID: saOl_My9OdS3atM3UsFMaA_1769177668 Received: by mail-dy1-f200.google.com with SMTP id 5a478bee46e88-2b6b9c1249fso3910252eec.1 for ; Fri, 23 Jan 2026 06:14:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769177667; x=1769782467; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=TXQhTWO7RPowRd/dcCZASPzpqIXJqi0mO8i2APjtYno=; b=KVUNW5sJdmifrYQWpREUtLuH8TdAxV5Nn0S48f8fTPy7AKrD+R6Mcjlvvts9Nz36LF TAuKbOtU16H7rEkW89SRH+TG0p11TGVoW4Ny4f5Jn8PECln/saK8dev6/74EqQwtP+aN /3deoZV+nLoJaRDBNRURzI+3M3g4r5WHiCuXQ6L2z2sZ9lD1VtRRRpYCeXdOT23e08vQ bdkOYdNF+nwelQVmEdXk0Dw5b57KTCfMQKle5qglHd1II7yZLjFXevPPY9CnjgyDZTKn A295RpwMlsYbWHMII0pNqhSZB4xTUhlUvV5SIt7v2ENVEFeHq4bP2DsBXDX9tkdyK5aB xQ6A== X-Gm-Message-State: AOJu0YxOcD+eKEoom6Bld7TGPEdOG2YkosJmvW5DPvcHjGjCNK4p7dII Xn0EiqYW7U0Ptkj9HADdVEIPL2mrdwxZsKNHSJSDRWPXANOgxzKErYuFk4kRjoKJlykGZxpHk/0 Hfx+CuNfQTJ6Uy9LMmC8RXr9/xvTSRuqRxLE6Tx00THRPVsYWOPgdk+RwGpUtW2AFS9PIYnE= X-Gm-Gg: AZuq6aJPxGpd7MBIwMpvGLCLgSYwa/MgpSQNCi3sw7WqYxNB/2YalxjLQVcCnrKkIJ7 ANtTNblo+OM4R1ymHrYbQKAzMYB+06qFNdr0Wpcz63kAeHEac2+weMBxvIVNECMvoOzv/FGrx1V 97PI2KEoSGC289itv29Unon+9QeaV1AThC75JqV4/9ECM1GTOGwCkH0bnpUdabBobvBTN2sRDep 4FJXWXphznARGeDqmibbzXRIOQ4Db1WeKTvARPc/b72kW71VA69hvaMgvTeStrxryWMptIS2D8Y 7Lsm5pctXxa00CVYu7fUC+lo7zCzG6bP3ZjCGqJUQ0DTVs2hpO4QZd/CKTbKSvoTBePA1bCsoF5 PxdkBUu4OmyuhFyfOBtE3P9+9VMeuTds3OLNK0sCNcPBK7QpSDPo85CRU X-Received: by 2002:a05:7301:6097:b0:2b7:32fe:4bbc with SMTP id 5a478bee46e88-2b739994d31mr1010920eec.17.1769177667306; Fri, 23 Jan 2026 06:14:27 -0800 (PST) X-Received: by 2002:a05:7301:6097:b0:2b7:32fe:4bbc with SMTP id 5a478bee46e88-2b739994d31mr1010908eec.17.1769177666811; Fri, 23 Jan 2026 06:14:26 -0800 (PST) Received: from ?IPV6:2804:18:1855:dcda:6203:cb74:e896:9c45? ([2804:18:1855:dcda:6203:cb74:e896:9c45]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b73a9e1bc8sm3047661eec.22.2026.01.23.06.14.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Jan 2026 06:14:25 -0800 (PST) Message-ID: <19c407af-d5a8-49a0-9413-1d41d23c7fbf@redhat.com> Date: Fri, 23 Jan 2026 11:14:20 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] gdb: add tutorial command To: Eli Zaretskii Cc: gdb-patches@sourceware.org References: <20260122202834.393095-1-guinevere@redhat.com> <86o6mkiz1o.fsf@gnu.org> From: Guinevere Larsen In-Reply-To: <86o6mkiz1o.fsf@gnu.org> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: BTfbRIIoqzAXHuNaLMgZLdFVPA7tjDJia7_fEITI_y8_1769177668 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="------------4LPeBAPB6QNz4ECvw0PKKshs" Content-Language: en-US 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 This is a multi-part message in MIME format. --------------4LPeBAPB6QNz4ECvw0PKKshs Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 = {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 remember 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, but I find the side-effect explanation to be worth the unintuitiveness -- Cheers, Guinevere Larsen It/she --------------4LPeBAPB6QNz4ECvw0PKKshs Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
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 = {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 remember

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, but I find the side-effect explanation to be worth the unintuitiveness

-- 
Cheers,
Guinevere Larsen
It/she
--------------4LPeBAPB6QNz4ECvw0PKKshs--