From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id pBjzFgFsiGqt+DMAWB0awg (envelope-from ) for ; Fri, 21 Aug 2026 11:17:21 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=QBMKh+/A; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 4CE9E1E0A3; Fri, 21 Aug 2026 11:17:21 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 AD4EE1E033 for ; Fri, 21 Aug 2026 11:17:20 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5205E4BAE7F3 for ; Fri, 21 Aug 2026 15:17:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5205E4BAE7F3 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=QBMKh+/A Received: from omta34.uswest2.a.cloudfilter.net (omta34.uswest2.a.cloudfilter.net [35.89.44.33]) by sourceware.org (Postfix) with ESMTPS id D73F04BA540B for ; Fri, 21 Aug 2026 15:16:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D73F04BA540B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D73F04BA540B Authentication-Results: sourceware.org; arc=none smtp.remote-ip=35.89.44.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787325415; cv=none; b=WAPG0zC+lzV2Jt4rjM/3F0eVrk59wUDVnryiFutD6sSGjc+tQ4QcvtMguoLprfprpupUoG+ZLjlV/jelo/FFH8r6I/DJJ7oMPgKsOu9002t1YJMNA4Syqozo4JM/A2yO8i9V0WYzaXY2PIAn7c2lMskFj3KzDWLA4JPoSHxjVoY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787325415; c=relaxed/simple; bh=3VZ6vVjPN2tnZt51m2mClN0+Z9dhqR5OJfFcPW6JbV4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=gb166ls1ZUJ9/o0bzk2eUen+3AE7+FkIkVJQBKy4HGEwze9O+qvWSSYy7ek2YjNj2fi5V9fFb1q4gCK1F9TVJgGvuJSKIClRAFnRxECq70M8uKMER2K+S7MouMRYHdtxm3tVqH/Nxcjm7R20WcK9yUyYG/DYo8gbHnC1b63Fz3A= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=QBMKh+/A reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D73F04BA540B Received: from eig-obgw-6005b.ext.cloudfilter.net ([10.0.30.162]) by cmsmtp with ESMTPS id xQj0wzJO5aC0UxQzFwuyk3; Fri, 21 Aug 2026 15:16:53 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id xQzFwDKAqtyrGxQzFwetyv; Fri, 21 Aug 2026 15:16:53 +0000 X-Authority-Analysis: v=2.4 cv=JaK8rVKV c=1 sm=1 tr=0 ts=6a886be5 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=Sv0fKeRqtYgA:10 a=ItBw4LHWJt0A:10 a=yrqJkgie3hwbRi0bM1sA:9 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=kszPKjaYXptcH0Kax9mCB8/DL/FuMyfwh9jp2Un8rWM=; b=QBMKh+/AThhQpRPHu2+om+JB/+ 9lPGrcdfJ6liylsLeUbz3luiAWQwgpHNXVQJ8OTjm6OKzIbqENZ2PWqcxGRqOMlHB/7aURxjSx4M7 ZKBlCooNW1201yMO2kzmCB/Ys; Received: from 97-122-117-2.hlrn.qwest.net ([97.122.117.2]:51208 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.5) (envelope-from ) id 1wxQzF-000000040eO-0DUo; Fri, 21 Aug 2026 09:16:53 -0600 From: Tom Tromey To: Rainer Orth Cc: Subject: Re: [PATCH] Skip gdb.base/break.exp catchpoint tests without catchpoints [PR34535] In-Reply-To: (Rainer Orth's message of "Thu, 20 Aug 2026 16:12:59 +0200") References: X-Attribution: Tom Date: Fri, 21 Aug 2026 09:16:52 -0600 Message-ID: <87tsonsduj.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.117.2 X-Source-L: No X-Exim-ID: 1wxQzF-000000040eO-0DUo X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-117-2.hlrn.qwest.net (bapiya) [97.122.117.2]:51208 X-Source-Auth: tom+tromey.com X-Email-Count: 10 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfMQvKJ/O++sd6aofLStIpBTpm3VcjVzRzMTqwMq6Ks8StEIrVRNzKtdOQ82C8sVMIDo4RjR4CkdoFUmmR0a5SeH1VgPhXRRI39yw0pAY48tUZ7k51yqb dL1f2y7x1U/GVRE5Z5oeo04HSg3hjS6KXxpGLBYbdFLx7z27TIvgbGkwcMmYo8gnvbbOKknZLu3DBRtEA02J5YXRkeCupno+2Jo= 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 >>>>> "Rainer" == Rainer Orth writes: Rainer> As detailed in PR PR testsuite/34535, the gdb.base/break.exp test FAILs Rainer> on Solaris: Thanks for the patch. 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: int fork_catchpoint::insert_location (struct bp_location *bl) { if (is_vfork) return target_insert_vfork_catchpoint (inferior_ptid.pid ()); else return target_insert_fork_catchpoint (inferior_ptid.pid ()); } So basically the target has to implement the insert_fork_catchpoint target method; then arrange to tell gdb about TARGET_WAITKIND_FORKED when appropriate. Unfortunately the target methods don't have comments; while we try to add descriptions nowadays, in the past gdb was lax about this :( But there's a "paragraph" of them in target.h that you'd probably need to handle: virtual int insert_fork_catchpoint (int) TARGET_DEFAULT_RETURN (1); virtual int remove_fork_catchpoint (int) TARGET_DEFAULT_RETURN (1); virtual int insert_vfork_catchpoint (int) TARGET_DEFAULT_RETURN (1); virtual int remove_vfork_catchpoint (int) TARGET_DEFAULT_RETURN (1); virtual void follow_fork (inferior *, ptid_t, target_waitkind, bool, bool) TARGET_DEFAULT_FUNC (default_follow_fork); 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. thanks, Tom