From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 02/11] [gdb/testsuite] Fix return -level 2 bug in with_test_prefix
Date: Wed, 23 Sep 2026 23:36:43 +0200 [thread overview]
Message-ID: <2e103a39-03c2-4dcb-acf0-8d16b3e52eb6@suse.de> (raw)
In-Reply-To: <87bjaf4erz.fsf@tromey.com>
On 9/2/26 9:46 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>
> Tom> Fix this by:
> Tom> - using "catch {...} result opts" to capture the return options dictionary
> Tom> - increasing -level in $opts, and
> Tom> - using return -options $opts,
> Tom> reducing exception handling to just two lines:
> Tom> ...
> Tom> catch {uplevel 1 $body} result opts
> Tom> ...
> Tom> return -options [dict incr opts -level 1] $result
> Tom> ...
>
> It wasn't clear to me, but does this formulation also work correctly for
> things other than 'return' and 'error'? Like, are 'break' and
> 'continue' properly handled as well?
It does. Your question made me realize that the series should be
restructured.
So, I started out with the patch introducing transparent_uplevel.
Then I added a test-case for transparent_uplevel that should answer your
question.
Then there's a number of trivial refactor patches using
transparent_uplevel and try/finally.
I'm pushing this part now, and then I'll have a look over the rest of
the series.
Thanks,
- Tom
next prev parent reply other threads:[~2026-09-23 21:37 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 13:58 [PATCH 00/11] [gdb/testsuite] Refactor exception handling Tom de Vries
2026-08-24 13:58 ` [PATCH 01/11] [gdb/testsuite] Normalize indentation in with_test_prefix Tom de Vries
2026-09-02 19:41 ` Tom Tromey
2026-09-04 9:48 ` Tom de Vries
2026-08-24 13:58 ` [PATCH 02/11] [gdb/testsuite] Fix return -level 2 bug " Tom de Vries
2026-09-02 19:46 ` Tom Tromey
2026-09-23 21:36 ` Tom de Vries [this message]
2026-09-24 14:18 ` Tom de Vries
2026-08-24 13:58 ` [PATCH 03/11] [gdb/testsuite] Simplify foreach_with_prefix Tom de Vries
2026-09-24 14:10 ` Tom de Vries
2026-08-24 13:58 ` [PATCH 04/11] [gdb/testsuite] Refactor exception handling in foreach_with_prefix Tom de Vries
2026-08-24 13:58 ` [PATCH 05/11] [gdb/testsuite] Add transparent_uplevel Tom de Vries
2026-09-01 16:16 ` Keith Seitz
2026-09-23 19:05 ` Tom de Vries
2026-08-24 13:58 ` [PATCH 06/11] [gdb/testsuite] Refactor exception handling Tom de Vries
2026-08-24 13:58 ` [PATCH 07/11] [gdb/testsuite] Refactor exception handling in gdb_expect Tom de Vries
2026-08-24 13:58 ` [PATCH 08/11] [gdb/testsuite] Refactor exception handling in gdb_test_multiple Tom de Vries
2026-08-25 7:29 ` Tom de Vries
2026-09-01 16:13 ` Keith Seitz
2026-09-24 16:03 ` Tom de Vries
2026-08-24 13:58 ` [PATCH 09/11] [gdb/testsuite] Refactor exception handling in lock_file_acquire/release Tom de Vries
2026-08-24 13:58 ` [PATCH 10/11] [gdb/testsuite] Refactor exception handling in tentative_rename Tom de Vries
2026-08-24 13:58 ` [PATCH 11/11] [gdb/testsuite] Refactor exception handling in with_stub_devices Tom de Vries
2026-09-01 16:10 ` Keith Seitz
2026-09-23 19:06 ` Tom de Vries
2026-09-01 17:07 ` [PATCH 00/11] [gdb/testsuite] Refactor exception handling Keith Seitz
2026-09-02 19:57 ` Tom Tromey
2026-09-24 16:08 ` Tom de Vries
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=2e103a39-03c2-4dcb-acf0-8d16b3e52eb6@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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