| Message ID | 20260824135855.1195963-1-tdevries@suse.de |
|---|---|
| Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A99F24BA9035 for <patchwork@sourceware.org>; Mon, 24 Aug 2026 14:00:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A99F24BA9035 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=t3K2rHpE; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=1sgnAyBo; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=UexPE8ZL; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=eX2xyFba X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id 1CD264BA900A for <gdb-patches@sourceware.org>; Mon, 24 Aug 2026 13:59:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1CD264BA900A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1CD264BA900A Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787579945; cv=none; b=QAkfcEyoDgmJG1DSUENGGLtDdNDK8Si8u6VcvYKngCbvhcyq5w6uh43SCnjljaEN/JnnGA53MLSMF/ARnz6hFLArFXlUZFmai9i4AquBqZpNmSPYGZccLRG8r1BzXqQbV8vkVdLVlUttmJ84a0zq7rGhl2lcoK2RTC7XG3iS69A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787579945; c=relaxed/simple; bh=aaQGOIcaWKToQ7tcvGywKcwLjU88RLmc8wIfamEgeUk=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=CIrF5FRwvkIe8/y/CAwbTdb4t1c13fU90nArxY4cRQlDanyV460lFC5zg8C5WUfmqsMHdKj368WyavC3UFhyOmYLs8uHAgIdabxqK7KmsKt7JxhbVu283pS1X8JshEaJs2T2/2HskQWtd2tq10y6594OtjjHXtkBXA3z6eeY9t4= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=t3K2rHpE; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=1sgnAyBo; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=UexPE8ZL; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=eX2xyFba DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1CD264BA900A Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D9FDE84ADD for <gdb-patches@sourceware.org>; Mon, 24 Aug 2026 13:58:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1787579940; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=qRVwaf3L1SrJbvuZ8AAfps0fRQrIsg5dhvytaZs/HzQ=; b=t3K2rHpE9kb7ESHrt1t/HzrFre5DCp/MwRsLPLd+vHBSKIVBmshn15WvKIzW/4kTNe2O5B HBETDSnv4K143R0UvlX3xvaB3+CWawswPPoTdWxUcX9Whg1fQhYLuGjDqje8XgKj3j4zyQ L8gNm/U51oRWTN0wCiC35CIH6gqzBE0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1787579940; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=qRVwaf3L1SrJbvuZ8AAfps0fRQrIsg5dhvytaZs/HzQ=; b=1sgnAyBoGHqyI/cck5hTdo3JQjUR4+5IZwofsOhBOYQ2d6rLnwElkIBQml0EXQgKvwk5Jb DnCbJGBuBbjKL/Bg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=UexPE8ZL; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=eX2xyFba DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1787579935; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=qRVwaf3L1SrJbvuZ8AAfps0fRQrIsg5dhvytaZs/HzQ=; b=UexPE8ZLKTmfRUfWWSKbNGrvGAkJUhEa+aaDe0PFlWT66Qf/3F9FqXHP0XLAmBdSxkwv5j Kp0vKy5DIUcJyC+nT+vZ7iKeWMhuBMhFRq56A83EKXELgcODmAIEtwI8t8RZW3Uj4zqM2U nE+4jx8RgZmGmf09ijyz6ltLVP6lAxk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1787579935; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=qRVwaf3L1SrJbvuZ8AAfps0fRQrIsg5dhvytaZs/HzQ=; b=eX2xyFbagceLdkffxEs25TfGdXxxXP8rfTtrohNx7IGfStk6gyPk9qSNk6kpex2IYSTR6Y yyZygQMNctASO1Ag== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C4FE813332 for <gdb-patches@sourceware.org>; Mon, 24 Aug 2026 13:58:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id hfrSLh9OjGo+eQAAD6G6ig (envelope-from <tdevries@suse.de>) for <gdb-patches@sourceware.org>; Mon, 24 Aug 2026 13:58:55 +0000 From: Tom de Vries <tdevries@suse.de> To: gdb-patches@sourceware.org Subject: [PATCH 00/11] [gdb/testsuite] Refactor exception handling Date: Mon, 24 Aug 2026 15:58:44 +0200 Message-ID: <20260824135855.1195963-1-tdevries@suse.de> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; MIME_TRACE(0.00)[0:+]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; FROM_EQ_ENVFROM(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:dkim]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCVD_TLS_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DKIM_TRACE(0.00)[suse.de:+] X-Spam-Score: -3.01 X-Spam-Level: X-Rspamd-Queue-Id: D9FDE84ADD X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
Refactor exception handling
|
|
Message
Tom de Vries
Aug. 24, 2026, 1:58 p.m. UTC
This patch series does two things:
- use modern exception handling constructs like try/finally and
"return -options" (PR34552).
- fix bug in "return -level 2" handling (PR34553).
Tested on x86_64-linux.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34552
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34553
Tom de Vries (11):
[gdb/testsuite] Normalize indentation in with_test_prefix
[gdb/testsuite] Fix return -level 2 bug in with_test_prefix
[gdb/testsuite] Simplify foreach_with_prefix
[gdb/testsuite] Refactor exception handling in foreach_with_prefix
[gdb/testsuite] Add transparent_uplevel
[gdb/testsuite] Refactor exception handling
[gdb/testsuite] Refactor exception handling in gdb_expect
[gdb/testsuite] Refactor exception handling in gdb_test_multiple
[gdb/testsuite] Refactor exception handling in
lock_file_acquire/release
[gdb/testsuite] Refactor exception handling in tentative_rename
[gdb/testsuite] Refactor exception handling in with_stub_devices
gdb/testsuite/gdb.rocm/hcc-amdgpu-targets.exp | 15 +-
.../gdb.testsuite/foreach_with_prefix.exp | 27 ++
gdb/testsuite/gdb.testsuite/gdb-test.exp | 51 ++
.../gdb.testsuite/with-test-prefix.exp | 45 ++
gdb/testsuite/lib/ada.exp | 14 +-
gdb/testsuite/lib/dwarf.exp | 15 +-
gdb/testsuite/lib/gdb-utils.exp | 45 +-
gdb/testsuite/lib/gdb.exp | 449 ++++++++----------
gdb/testsuite/lib/mi-support.exp | 22 +-
gdb/testsuite/lib/tuiterm.exp | 15 +-
10 files changed, 383 insertions(+), 315 deletions(-)
create mode 100644 gdb/testsuite/gdb.testsuite/with-test-prefix.exp
base-commit: 7063b767cc9c2774e7ead41144e5613bacad6a0d
Comments
Hi, On 8/24/26 6:58 AM, Tom de Vries wrote: > This patch series does two things: > - use modern exception handling constructs like try/finally and > "return -options" (PR34552). > - fix bug in "return -level 2" handling (PR34553). Thank you for simplifying this exception handling. I've sent a few little nits, but otherwise, this LGTM. Reviewed-By: Keith Seitz <keiths@redhat.com> Keith > > Tested on x86_64-linux. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34552 > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34553 > > Tom de Vries (11): > [gdb/testsuite] Normalize indentation in with_test_prefix > [gdb/testsuite] Fix return -level 2 bug in with_test_prefix > [gdb/testsuite] Simplify foreach_with_prefix > [gdb/testsuite] Refactor exception handling in foreach_with_prefix > [gdb/testsuite] Add transparent_uplevel > [gdb/testsuite] Refactor exception handling > [gdb/testsuite] Refactor exception handling in gdb_expect > [gdb/testsuite] Refactor exception handling in gdb_test_multiple > [gdb/testsuite] Refactor exception handling in > lock_file_acquire/release > [gdb/testsuite] Refactor exception handling in tentative_rename > [gdb/testsuite] Refactor exception handling in with_stub_devices > > gdb/testsuite/gdb.rocm/hcc-amdgpu-targets.exp | 15 +- > .../gdb.testsuite/foreach_with_prefix.exp | 27 ++ > gdb/testsuite/gdb.testsuite/gdb-test.exp | 51 ++ > .../gdb.testsuite/with-test-prefix.exp | 45 ++ > gdb/testsuite/lib/ada.exp | 14 +- > gdb/testsuite/lib/dwarf.exp | 15 +- > gdb/testsuite/lib/gdb-utils.exp | 45 +- > gdb/testsuite/lib/gdb.exp | 449 ++++++++---------- > gdb/testsuite/lib/mi-support.exp | 22 +- > gdb/testsuite/lib/tuiterm.exp | 15 +- > 10 files changed, 383 insertions(+), 315 deletions(-) > create mode 100644 gdb/testsuite/gdb.testsuite/with-test-prefix.exp > > > base-commit: 7063b767cc9c2774e7ead41144e5613bacad6a0d
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
Keith> Thank you for simplifying this exception handling. I've sent
Keith> a few little nits, but otherwise, this LGTM.
Keith> Reviewed-By: Keith Seitz <keiths@redhat.com>
Thanks for doing that.
I appreciate this series quite a bit. I don't really get why Tcl came
up with such a convoluted approach to what seems like a pretty normal
thing to want to do; but oh well... anyway aside from the questions I
sent and Keith's comments, I think it all looks good.
Tom
On 9/2/26 9:57 PM, Tom Tromey wrote: >>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes: > > Keith> Thank you for simplifying this exception handling. I've sent > Keith> a few little nits, but otherwise, this LGTM. > > Keith> Reviewed-By: Keith Seitz <keiths@redhat.com> > > Thanks for doing that. > > I appreciate this series quite a bit. I don't really get why Tcl came > up with such a convoluted approach to what seems like a pretty normal > thing to want to do; but oh well... anyway aside from the questions I > sent and Keith's comments, I think it all looks good. Thanks both for the reviews, much appreciated. I've pushed all patches now, with the exception of "[PATCH 02/11] [gdb/testsuite] Fix return -level 2 bug in with_test_prefix". The code in this patch got merged into another patch, and the test-case was not all that useful. The new test-case gdb.testsuite/transparent-uplevel.exp covers the tested functionality much better. Thanks, - Tom