From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qN7oBDEDimpEWTcAWB0awg (envelope-from ) for ; Sat, 22 Aug 2026 16:14:41 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=dsILQjVR; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E1C401E0A3; Sat, 22 Aug 2026 16:14:40 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 227AB1E09B for ; Sat, 22 Aug 2026 16:14:37 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8FB784B9DB51 for ; Sat, 22 Aug 2026 20:14:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8FB784B9DB51 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=dsILQjVR Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id E97CA4BA23C0 for ; Sat, 22 Aug 2026 20:14:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E97CA4BA23C0 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E97CA4BA23C0 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=129.70.160.84 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787429644; cv=none; b=Q65s87XdnfgsADJCO7vL608mEGuKibF3azpWIS9DlnYCF8tEzr+LznJ15+cZKwcBhHzRIemF4t4fg44Cj3V4zs37O+Al1TpuzgTjfwNQSMKz4RRWHJf2voPqsv0XOE+zq3J6F2es5hi7oLRUfP7QmCPQ6QBU2w2a4Ap6ZXS7xTc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787429644; c=relaxed/simple; bh=x9H3JT0zgv56YEGu95pIYb+yJVPMQoazAqkkY6dY8b8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=PnmChjaJC0u+ZNd1oKcCmSk9rox1aLcAzlNsLfLXTiPye5stG/gRBUov9BfkF1PHa1XPyLFXTPx6FTdo7OZndvJ9I0kTIp43qyrrQdltsqzu8TVIF1YVGVgST1mxfcz/YDz48aq0YF5bnmyByImZRMstVCgCQHhoU4UWzHT9zbY= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=dsILQjVR DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E97CA4BA23C0 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id F3D7FEE78E; Sat, 22 Aug 2026 22:14:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= cebitec.uni-bielefeld.de; h=content-type:content-type :mime-version:user-agent:message-id:date:date:references :in-reply-to:subject:subject:from:from:received:received; s= 20200306; t=1787429642; bh=x9H3JT0zgv56YEGu95pIYb+yJVPMQoazAqkkY 6dY8b8=; b=dsILQjVRSyV2kYhVsZesNdNwt9uqYblQdZSeYIMzzvELTxxdyllRA h0a+cKGOyMEA6Jf7fzwTp1RzPgwZhEXLPS0/DjNwjtRHAtp+AZHwFU/glON1pl/6 N8U5TraDESUm/b0Dubil9e13zwHpV8q9erdfXvRmqySeVBD2scAUFNl472whNNCf fMezw9ECgqpqIp4VfQWPwsSTQIxdE74koY4UEJc0ayFw1tFf3ZGfPX8/E8/5sC/C HDkNCeAB4EAxAZSg+XSpo2DVxpoXXFf6u/XPfFxhss5Vf66aQgIb20Z0kauxwVPY sVugtNEXhu82oLAQe4xSHdFtXVzdyDYbQ== X-Virus-Scanned: amavisd-new at cebitec.uni-bielefeld.de Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9NdkP0mcg8gz; Sat, 22 Aug 2026 22:14:02 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p508553da.dip0.t-ipconnect.de [80.133.83.218]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 837EEEE78D; Sat, 22 Aug 2026 22:14:02 +0200 (CEST) From: Rainer Orth To: Tom Tromey Cc: Subject: [PATCH v2] Handle missing catchpoint support in gdb.base/break.exp [PR34535] In-Reply-To: <87tsonsduj.fsf@tromey.com> (Tom Tromey's message of "Fri, 21 Aug 2026 09:16:52 -0600") References: <87tsonsduj.fsf@tromey.com> Date: Sat, 22 Aug 2026 22:14:02 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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 --=-=-= Content-Type: text/plain Hi Tom, > Rainer> While this patch avoids the failure, I wonder if there's some document > Rainer> on what it takes to actually implement catchpoints. > > There's not really docs on anything. However, most catchpoints are > implemented in break-catch-*.c. Looking at break-catch-fork.c: thanks for the explanation. I may give it a try, but probably will go for lower-hanging fruit first. In the past, I've repeatedly failed miserably with patches requiring to dive more deeply into gdb... > Rainer> + set test "probe fork catchpoint" > Rainer> + gdb_test_multiple "" $test { > Rainer> + -re "Your system does not support this type.*" { > Rainer> + unsupported $test > Rainer> + } > Rainer> + -re "$::gdb_prompt $" { > Rainer> + set ::fork_catchpoints_supported 1 > Rainer> + pass $test > Rainer> + } > Rainer> + } > Rainer> +} > > Rainer> + if {!$::fork_catchpoints_supported} { > Rainer> + return > Rainer> + } > Rainer> + > Rainer> gdb_test "catch fork" "Catchpoint ${::decimal} \\(fork\\)" \ > Rainer> "set catch fork, never expected to trigger" > > I think it would be better to just use gdb_test_multiple here, and if > the "not supported" case is found, just return here. That would avoid > starting another gdb. Good idea. I did it with the separate test before because the errors only occur on the "continue" after setting the catchpoints. So here's the revision: it certainly makes things clearer and simpler. I think it's better to go for UNSUPPORTED here instead of just skipping the rest of the test. --------------------------------------------------------------------------- As detailed in PR PR testsuite/34535, the gdb.base/break.exp test FAILs on Solaris: FAIL: gdb.base/break.exp: test_no_break_on_catchpoint: continue until exit (the program exited) warning: Error inserting catchpoint 2: Your system does not support this type of catchpoint. warning: Error inserting catchpoint 3: Your system does not support this type of catchpoint. warning: Error inserting catchpoint 4: Your system does not support this type of catchpoint. This patch handles that condition. Tested on x86_64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu. -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=sol2-break-no-catchpoint.patch # HG changeset patch # Parent d1c17963050f4ebaae63ff7cfb1eb8e5c5d7fc77 Skip gdb.base/break.exp catchpoint tests without catchpoints [PR34535] diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp --- a/gdb/testsuite/gdb.base/break.exp +++ b/gdb/testsuite/gdb.base/break.exp @@ -471,7 +471,14 @@ proc_with_prefix test_no_break_on_catchp gdb_test "catch exec" "Catchpoint ${::decimal} \\(exec\\)" \ "set catch exec, never expected to trigger" - gdb_continue_to_end + gdb_test_multiple "continue" "" { + -re "Your system does not support this type.*" { + unsupported "target does not support this type of catchpoint" + } + -re "Continuing." { + pass "continue until exit" + } + } } test_no_break_on_catchpoint --=-=-=--