From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id m3n4J8MV2mr4VAsAWB0awg (envelope-from ) for ; Thu, 22 Oct 2026 09:55:15 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QKghKxEZ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8DC74378003; Thu, 22 Oct 2026 09:55:15 -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.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED 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 BD1EE378002 for ; Thu, 22 Oct 2026 09:55:14 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D1FF24BA2E39 for ; Thu, 22 Oct 2026 13:55:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1FF24BA2E39 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QKghKxEZ Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id A94824BA2E2F for ; Thu, 22 Oct 2026 13:54:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A94824BA2E2F Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A94824BA2E2F Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792677288; cv=none; b=ijkIcog2A1vi9VHNqsSOTskra64qy3S7w6v8M/7USqGwmtuTFXcpqiyT8wVplFVfq+s5/IMmzvNqk88FfyuO50pJ+HOsASvSnylDDH94I6lvs6oQMrUDOYVNgldawj+V1b7FBgAbjMQEEOiTw6xJW+ZHYR4mNixuomr662T7x9s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792677288; c=relaxed/simple; bh=sQ4f76nDNGjsLXU5cKWaoK5ZZiPQ6TyN2GZIO1XBi2c=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=UFdxTq/oFtneUSM/BHUy+68OuxlRMxEI50snuNPy/Qlgq1ng3qnYHVV3JzxdxlkzcvaRi/9g6sUR0BQdfKk4cD/cVSbhpXkp7ksifrAgdxhy/oHGYtyIxD5zw8Wiryjx7Dt3nqwNL0L9ciAKlDT+LaYQ/hYul/DlTikLEeJvLnU= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QKghKxEZ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A94824BA2E2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792677288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0ehJGMUdTahqOhot+RnfYBdAzgVzLpmtTgZSx7xFH0k=; b=QKghKxEZ2Vuf9pKlalBL2K1rbhFliErthozVaUfoEnPIQS78pIOEESFt1uojkjtdBuQesI PPoQI/tRa2B1Hnx4ZyTYnVC8TRX8HfdyBN4ZOGzvvnti+i9sZKu0DlRzXacvkrjWdPnh2I f3FXG6JAcQOZON5RY38oyXO7V4xvHMw= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-25-sSIG-6VzP26cUbC8gXjVHA-1; Thu, 22 Oct 2026 09:54:44 -0400 X-MC-Unique: sSIG-6VzP26cUbC8gXjVHA-1 X-Mimecast-MFC-AGG-ID: sSIG-6VzP26cUbC8gXjVHA_1792677284 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4a20e41008cso900935e9.1 for ; Thu, 22 Oct 2026 06:54:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792677284; x=1793282084; h=content-transfer-encoding:content-type:mime-version:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=0ehJGMUdTahqOhot+RnfYBdAzgVzLpmtTgZSx7xFH0k=; b=pj9G2irxNR6jEGgi0W6va5HDREdTo31SktlW3uKtSd4fy6hKruRYDyFNu7l2iHAbKR 58fkzSCasW9AkB4Atmn/GfMnwGd1gcZIHDDwSpM9l2T6htBCbT36L7tYtQJIr2Czlq+E KnbPLKBaP2NQJEgzdmQMeCFafH3dtgmBp7xfdFMEi+SS7DBFIYUWcJ0sm2dT0i4xfnac 5tmDPmFjwcbBs+3idX/3O8Cb/VYzx59eyXA6hZM9i9Wns1vIGdRmipW0CCk7E02Q1Svc NfwbikCcGxs7XjXz/UG4qGA4NWpyLHZdFyzcCrNhcjcpAco6D2c1r/in6CumweUtjp4Z 91zA== X-Gm-Message-State: AFq9FYJ0GKhv/Cyk1PkxV/d5mPXKQ9+X4fHEd5QgwrFZnP7/CoztIUKl IauI3ic5cn06tpCYgiuwgE3HKXVqcSCfTzBl53I91Xr97KJQUyYGOP6V86vMEpy1q4IQMd2fdJv ZU5+SUyjorUCA6sIp7nwuvEgwmTuqVaKhj6877vfIjtzpp1HWaxVsPUslr3jQPww= X-Gm-Gg: AYBFou3YajP3g0+VcxSZFY4YRcBl0F0CHiwu2/Vwx/EYnSVe/jO13k4w4CJukzY1pK5 k7kf0+ENBWpbQ78+A6++XzKOOE5PnQqwE87MJJLmgm7q4DAvmFntXuTIpZfw1DwWxglD7V5qxlX uojdt0NqXWUjadctizL1XQ+gSZSIAMSs8vH5cVm5ZxzrY/k3h5iERaoxy+BMEzfjnEs6xqzIZeJ aWi2SyYb8WyXl6P9A+xoUtoErw+XAn4TRt1YNsFsPHWLU4g+L5PNCWElSF8n/0QWDAgb4veYzTx CFpubxMk5/y4gE0fTjOKh+Eusy8CjYCw+JqD0/bFudqSBK1qLj9qQdpSogeNj/7OU26h X-Received: by 2002:a05:600c:6304:b0:4a0:251f:a726 with SMTP id 5b1f17b1804b1-4a1fdd4a619mr112162305e9.24.1792677283599; Thu, 22 Oct 2026 06:54:43 -0700 (PDT) X-Received: by 2002:a05:600c:6304:b0:4a0:251f:a726 with SMTP id 5b1f17b1804b1-4a1fdd4a619mr112161765e9.24.1792677283113; Thu, 22 Oct 2026 06:54:43 -0700 (PDT) Received: from localhost ([213.31.44.29]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a203a71f6dsm70815435e9.0.2026.10.22.06.54.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2026 06:54:42 -0700 (PDT) From: Andrew Burgess To: Tom Tromey , =?utf-8?B?VG9tw6HFoSBIcm7EjWlhcg==?= Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb/python: add allow_pending parameter to gdb.Breakpoint constructor In-Reply-To: <877bjk46l1.fsf@tromey.com> References: <20261013074751.754142-1-thrnciar@redhat.com> <877bjk46l1.fsf@tromey.com> Date: Thu, 22 Oct 2026 14:54:41 +0100 Message-ID: <87a4o596xq.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 9SAVd36pLTBLDEz3rTabbsNvxS8PWv_mlXGlR4pHIhc_1792677284 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 Tom Tromey writes: >>>>>> "Tom=C3=A1=C5=A1" =3D=3D Tom=C3=A1=C5=A1 Hrn=C4=8Diar writes: > > Tom=C3=A1=C5=A1> Add a new allow_pending parameter to the gdb.Breakpoint = constructor. > Tom=C3=A1=C5=A1> Setting the new parameter to False causes GDB to raise a= n error instead > Tom=C3=A1=C5=A1> of creating a pending breakpoint. By default this param= eter is True, > Tom=C3=A1=C5=A1> which allows pending breakpoints to be created, preservi= ng the existing > Tom=C3=A1=C5=A1> 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=3D12816 > > Tom=C3=A1=C5=A1> + ** The gdb.Breakpoint constructor now takes an option= al > Tom=C3=A1=C5=A1> + 'allow_pending' argument. Setting it to False cau= ses GDB to raise > Tom=C3=A1=C5=A1> + 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=C3=A1=C5=A1 about this patch before i= t was posted. I suggested that the argument be called allow_pending rather than just pending as having: bp =3D gdb.Breakpoint("file.c:10", pending=3DTrue) seemed (to me) that this was a request *for* a pending breakpoint, which clearly isn't what this actually does. I felt that: bp =3D gdb.Breakpoint("file.c:10", allow_pending=3DTrue) 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 =3D gdb.Breakpoint("file.c:10", pending=3DFalse) 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. Thanks, Andrew