From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 3/3] [gdb/testsuite] Use save_vars to restore GDBFLAGS
Date: Fri, 03 May 2024 14:10:05 -0600 [thread overview]
Message-ID: <87ikzud5cy.fsf@tromey.com> (raw)
In-Reply-To: <20240417165800.23467-3-tdevries@suse.de> (Tom de Vries's message of "Wed, 17 Apr 2024 18:58:00 +0200")
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> There's a pattern of using:
Tom> ...
Tom> set saved_gdbflags $GDBFLAGS
Tom> set GDBFLAGS "$GDBFLAGS ..."
Tom> <do something with GDBFLAGS>
Tom> set GDBFLAGS $saved_gdbflags
Tom> ...
Tom> Simplify this by using save_vars:
Tom> ...
Tom> save_vars { GDBFLAGS } {
Tom> set GDBFLAGS "$GDBFLAGS ..."
Tom> <do something with GDBFLAGS>
Tom> }
Tom> ...
Great minds...
https://inbox.sourceware.org/gdb-patches/20240206173132.1272893-1-tom@tromey.com/
Anyway, ok.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
next prev parent reply other threads:[~2024-05-03 20:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 16:57 [PATCH 1/3] [gdb/testsuite] Update INTERNAL_GDBFLAGS example Tom de Vries
2024-04-17 16:57 ` [PATCH 2/3] [gdb/testsuite] Remove superfluous -quiet and -ex set width/height 0 Tom de Vries
2024-05-03 20:10 ` Tom Tromey
2024-04-17 16:58 ` [PATCH 3/3] [gdb/testsuite] Use save_vars to restore GDBFLAGS Tom de Vries
2024-05-03 20:10 ` Tom Tromey [this message]
2024-05-04 8:05 ` Tom de Vries
2024-05-03 20:10 ` [PATCH 1/3] [gdb/testsuite] Update INTERNAL_GDBFLAGS example Tom Tromey
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=87ikzud5cy.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).