From: Guinevere Larsen <guinevere@redhat.com>
To: Andrew Burgess <aburgess@redhat.com>, Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] gdb: add tutorial command
Date: Mon, 26 Jan 2026 15:50:39 -0300 [thread overview]
Message-ID: <9cb9a2da-fc1e-422e-b7f6-8513246366e4@redhat.com> (raw)
In-Reply-To: <87zf60fmqx.fsf@redhat.com>
On 1/26/26 11:54 AM, Andrew Burgess wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> Date: Fri, 23 Jan 2026 11:14:20 -0300
>>> Cc: gdb-patches@sourceware.org
>>> From: Guinevere Larsen <guinevere@redhat.com>
>>>
>>>> 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
>
Seeing as everyone seems to be in agreement with using set, I'll update
the text when I send a v3.
--
Cheers,
Guinevere Larsen
It/she
next prev parent reply other threads:[~2026-01-26 18:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 20:28 Guinevere Larsen
2026-01-23 7:11 ` Eli Zaretskii
2026-01-23 14:14 ` Guinevere Larsen
2026-01-23 14:23 ` Arsen Arsenović
2026-01-23 14:28 ` Eli Zaretskii
2026-01-26 14:54 ` Andrew Burgess
2026-01-26 18:50 ` Guinevere Larsen [this message]
2026-01-24 11:41 ` Hannes Domani
2026-01-26 18:08 ` Guinevere Larsen
2026-01-26 16:13 ` Andrew Burgess
2026-01-27 19:39 ` Guinevere Larsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9cb9a2da-fc1e-422e-b7f6-8513246366e4@redhat.com \
--to=guinevere@redhat.com \
--cc=aburgess@redhat.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox