From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GyoaF+pM2mrxNwwAWB0awg (envelope-from ) for ; Thu, 22 Oct 2026 13:50:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1792691434; bh=8ICX8GQECsIyKqCGgeU986ESkZbZyf+poY8tBfxM8Mo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=iN2jGWcu8LsR7zNfveWkS5ThSTNy39/6HFolbklUfYRb5gX1WtRYt/zTSPhHp4z+f xrwWvdcGqZTjjuWSktweICrus/KdimDw3DfH41cqZYdtnPPpSIgH2h2echMxPMvcRc uvNQT6ap/kRUJGe99l/eb/i/E6axmx0VArok2zAc= Received: by simark.ca (Postfix, from userid 112) id 46ADB1E06B; Thu, 22 Oct 2026 13:50:34 -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 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=qo7crGH3; dkim-atps=neutral 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 8F5071E023 for ; Thu, 22 Oct 2026 13:50:32 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BEA984BA23DB for ; Thu, 22 Oct 2026 17:50:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BEA984BA23DB Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=qo7crGH3 Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 0BD854BA2E2F for ; Thu, 22 Oct 2026 17:50:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0BD854BA2E2F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0BD854BA2E2F Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792691408; cv=none; b=NETUEXOULLAbECS7kf8wFocx8kxwfkAxg+pbqk+lqRa3fs0R723eRllNovsNaKHohqLAC6fpArLdWuKM3ZU5pnZ9KxvnkMrKW98/m+l//j6an7za3ebLZ7TVekWuQX8UN+YVgk9ob7S8pndQdYC2G3y3Jdku1x1ZP2iATUFYpGw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792691408; c=relaxed/simple; bh=8ICX8GQECsIyKqCGgeU986ESkZbZyf+poY8tBfxM8Mo=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=tNA4ACFilzAm1zDTGk1gKX8u9vlCQbFo1GrfrsDGIfagzxpqLJx2b3O13NQn8vuni8Yh7zRQXZqWUirxig6DS/If4iGQH0jh3hY0GyzijwuG80NrnCKxxCid66xEiJk1gIZoxlOQR0igYLtwwrbR8wtaySrD73I3bRZ1FaPz9Z0= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=qo7crGH3 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0BD854BA2E2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1792691406; bh=8ICX8GQECsIyKqCGgeU986ESkZbZyf+poY8tBfxM8Mo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=qo7crGH3woC5i10BpXYDPfXYTJb8YqSuvhX4bmw1FiFlVyrt02o3cnXJNQi/Aur6k ynW+Pf6CCIHnH4AGpK3QQ4SFMzO15F0Eu72R1ctGlfW+fd7TgHYuFFXnkAHVmt1yQz p+tbGV2KQ1IIhBxjlHXYywhTQj4J5lExXIV7+Kv4= Received: by simark.ca (Postfix) id 3CEFF1E007; Thu, 22 Oct 2026 13:50:06 -0400 (EDT) Message-ID: <7e36fbc5-4cc4-4ca7-88fd-11ec010f2a46@simark.ca> Date: Thu, 22 Oct 2026 13:50:05 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb/python: add allow_pending parameter to gdb.Breakpoint constructor To: Andrew Burgess , Tom Tromey , =?UTF-8?B?VG9tw6HFoSBIcm7EjWlhcg==?= Cc: gdb-patches@sourceware.org References: <20261013074751.754142-1-thrnciar@redhat.com> <877bjk46l1.fsf@tromey.com> <87a4o596xq.fsf@redhat.com> Content-Language: fr From: Simon Marchi In-Reply-To: <87a4o596xq.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 On 10/22/26 9:54 AM, Andrew Burgess wrote: > Tom Tromey writes: > >>>>>>> "Tomáš" == Tomáš Hrnčiar writes: >> >> Tomáš> Add a new allow_pending parameter to the gdb.Breakpoint constructor. >> Tomáš> Setting the new parameter to False causes GDB to raise an error instead >> Tomáš> of creating a pending breakpoint. By default this parameter is True, >> Tomáš> which allows pending breakpoints to be created, preserving the existing >> Tomáš> behaviour. >> >> Hi. Thanks for the patch. >> >> This is PR python/12816 so please add this tag to the commit message: >> >> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=12816 >> >> Tomáš> + ** The gdb.Breakpoint constructor now takes an optional >> Tomáš> + 'allow_pending' argument. Setting it to False causes GDB to raise >> Tomáš> + an error instead of creating a pending breakpoint. >> >> I wonder about calling the new argument 'pending' instead. I tend to >> think that's a bit nicer since we already match the parameter and >> attribute name for 'temporary'. > > Hi Tom, > > Full disclosure: I consulted with Tomáš about this patch before it was > posted. > > I suggested that the argument be called allow_pending rather than just > pending as having: > > bp = gdb.Breakpoint("file.c:10", pending=True) > > seemed (to me) that this was a request *for* a pending breakpoint, which > clearly isn't what this actually does. I felt that: > > bp = gdb.Breakpoint("file.c:10", allow_pending=True) > > was much clearer about the intent. > > Though, having just typed this, I realise that as 'True' is the default, > you'll never actually write that, you'd instead only write: > > bp = gdb.Breakpoint("file.c:10", pending=False) > > where reading this as a request *for* a non-pending breakpoint is > actually fine. So, I guess the case where the name 'pending' is (IMHO) > confusing, is the case that you're less likely to write. > > Still, I do prefer the fuller name, but if you'd rather it was changed, > then that's also fine with me, I'm not that tied to it. I like "allow_pending" for the reason you explained. Simon