From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id HvoHHDaAd2npKxYAWB0awg (envelope-from ) for ; Mon, 26 Jan 2026 09:54:46 -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=Y13lPyxe; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 628CF1E08D; Mon, 26 Jan 2026 09:54:46 -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,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 93E681E08D for ; Mon, 26 Jan 2026 09:54:45 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 187B64BBCDF9 for ; Mon, 26 Jan 2026 14:54:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 187B64BBCDF9 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=Y13lPyxe 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 D83A14BA9025 for ; Mon, 26 Jan 2026 14:54:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D83A14BA9025 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 D83A14BA9025 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=1769439260; cv=none; b=mZSOVx3CuIwJndXOVBRU1iMdnr1O/mcTyusZCnoZpNtm6p4urVghwpHglNJE9Ut0pwF4jLmdPrxjOgCqYl5EygwtkvZUxDjB4C088FXmUupEcIoefDtLzgmFFhNTxHgALN2XpJF+IHyJ6LaFIlPp2jK0u7B9cO5Gxm+aZ2kHgaI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769439260; c=relaxed/simple; bh=dOatzB/WeggrOjE+qmlTxGMuE7JuifZPmm1Lvm6mZ9k=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=COClpUptQG7yV6CyB54LqcoGsQVAyJUlquk1ExGQzejy9iLMj6Qd0LeyvLoIswC1yMor1FC4wx2v3e7gueb8Vt8JYc5DoH8O02b2T+KJzNcGntNdPStghVHnD82D9sAV4rZ2Oq7JbHcowAVo5+bC7hRP0lLq44T3G9aRYBn7ous= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D83A14BA9025 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769439259; 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=Q68uWYKQeC6eJkkMLozmPeEWQRlABV4nz0ZWo0Xvrno=; b=Y13lPyxeqApPfkGNKh0J9IZwgYBwsgglgyNyF7pGY5XSup9n0dXJMm+IH/CV6BydT4Q9PE K/vaAkRUYs+yyBD9N5crN5UmR4q1Q3qD3mhgd0MnWEY9DPXI176k8PRv8vsfG1n4xuSGEZ iJgH39qpMNSKb80xMSvF3fHv/DYqjQ0= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-256-oLuC3eGOOo-0AdP2SIphPQ-1; Mon, 26 Jan 2026 09:54:18 -0500 X-MC-Unique: oLuC3eGOOo-0AdP2SIphPQ-1 X-Mimecast-MFC-AGG-ID: oLuC3eGOOo-0AdP2SIphPQ_1769439256 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-435ab907109so2121968f8f.3 for ; Mon, 26 Jan 2026 06:54:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769439256; x=1770044056; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Q68uWYKQeC6eJkkMLozmPeEWQRlABV4nz0ZWo0Xvrno=; b=bYzaGFdh+3DZWRPjh9eZ8FGCU50NCgyzv2N5ShRE/+mHKlEb2ttUkpw3gLOTbnbhJc ghiEYVycdNgw65TjIHsPvqkSnCsjV9PoMT+h+PA72SxqkzmrUEXshuoJ2pqk389euaAW mE1v66CEBPO7xbBVxQHDYtMoldAZ21hcURfSyqQcM2hbt3mefCBamFDy/FCBHLgVAQch kffU+garxAPXH6WivM6knq6hiucdnzcwgHNOW3j08Rec17yJU3WuZhE2VabPXTqaFWRm T0WVo2UDuxuSO11VuGd3kSt5emrebZv1BIGfqu/Hx7dVsQnws+T66erM35s9SOCQtJJG 1Log== X-Gm-Message-State: AOJu0YxVv8IKVXcRpCYW8j0cOGVAKP47a4AMLZSAryIGL3kqEQcgLYsl /lzlEmqOTEb0xaT5zhpztB3Kt1lsvS7d+tdir6pKv9lqKjh8IApIH5D/v5aqmdKdiUBLodMe4hS qmxVNroOrC1N8zm25J6vmbBzf7eDW+Tg5MZ4axpdXQHBWP7APqIPFJ1UTlprQTl4= X-Gm-Gg: AZuq6aLmyiZ6ego5zv7xZ1Q9o+hO/9cN2/O/qUQ71VBZks3O/kt9jjWDVlG5B1CHVkh C6opT/n8hoH04KmkvDDoYUw21MapW4J5N74n9qyrezlz9G8PvrCznCpja2TvsvYyvhFW7Ovhmsg KklmB5kLJY7YRV605OSEV+Lbd1ZDgrFQgUWY6STl7C2+4f/O9Wr7xdLOte7t4QViniMHzTAKFb5 SFiAr0kFFMPLHsWrvBmhi4IKmvc29edYZcxBOBS6QbL67xjaHvqq0s3r6ME+g/ZTAz9z0qsI49b UYl5Y4jFjp6zrHLXsXXea5E1vEhYuc2jQou3OFiyd2tFa1eKbCeA0GBLpIftZ7wd5QGShT8ftzr REo8h X-Received: by 2002:a05:6000:2401:b0:435:975d:33b0 with SMTP id ffacd0b85a97d-435ca1addb1mr8453871f8f.35.1769439256464; Mon, 26 Jan 2026 06:54:16 -0800 (PST) X-Received: by 2002:a05:6000:2401:b0:435:975d:33b0 with SMTP id ffacd0b85a97d-435ca1addb1mr8453831f8f.35.1769439256019; Mon, 26 Jan 2026 06:54:16 -0800 (PST) Received: from localhost ([31.111.84.232]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1c24ac1sm30419367f8f.14.2026.01.26.06.54.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jan 2026 06:54:15 -0800 (PST) From: Andrew Burgess To: Eli Zaretskii , Guinevere Larsen Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v2] gdb: add tutorial command In-Reply-To: <864iocietp.fsf@gnu.org> References: <20260122202834.393095-1-guinevere@redhat.com> <86o6mkiz1o.fsf@gnu.org> <19c407af-d5a8-49a0-9413-1d41d23c7fbf@redhat.com> <864iocietp.fsf@gnu.org> Date: Mon, 26 Jan 2026 14:54:14 +0000 Message-ID: <87zf60fmqx.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: TIvW2peS6w08kHR-rJFLnTT4W4Gga5mryDrAjcyvVMg_1769439256 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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 Eli Zaretskii writes: >> Date: Fri, 23 Jan 2026 11:14:20 -0300 >> Cc: gdb-patches@sourceware.org >> From: Guinevere Larsen >> >> > 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 > > I think the tutorial should teach the commands intended for their > purposes. Some commands have side effects, but that's not newbie > stuff, IMO. > > What do others think about this? I agree Eli. I have always find it strange that some folk use print to set variable. At least Guinevere did offer some explanation, which is nice to know, but I do think that for beginner, using the intended command would be a good idea. That doesn't mean there's not room for some kind of: Advanced hint: Some users use 'print' instead of 'set' for setting inferior variables, this works because ... etc. within the tutorial text. Thanks, Andrew