From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4TSpF2+fu2poHxcAWB0awg (envelope-from ) for ; Tue, 29 Sep 2026 07:22:23 -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=PwZX8EOM; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 4F3641E033; Tue, 29 Sep 2026 07:22:23 -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 64A8E1E033 for ; Tue, 29 Sep 2026 07:22:22 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E08C74BB3B86 for ; Tue, 29 Sep 2026 11:22:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E08C74BB3B86 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=PwZX8EOM 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 986B74BB3BBB for ; Tue, 29 Sep 2026 11:21:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 986B74BB3BBB 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 986B74BB3BBB 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=1790680909; cv=none; b=GegBbAEcnfhHV8RDDlWk1xp2iW/mueT/oq8YB1onWtBD74QG+hpTpe+xJ+v4JUHwlNtXeQquuMtEiFgdwPj/KFUsrIOZMcM1CJD4Wu4JjxHCpBewoUPPAKCOSK3Jzq4TmX0pqtEumpjTGRI4TjnhVs4U8gTc3+fS3nZpVvl+m4g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790680909; c=relaxed/simple; bh=7JWptzxcevCXEAhGpP/+9mv2o99OiWdVi+nIf+knJNI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=rxEwXEOZp4MFvn1ql8dPzRN94IgKqwY6Pie3JcXGAo2oEHqyt00RnLfXF3kWRBQuUO/uDvSfaZ7mIe4Mgp6LYrBAVPneruPQe3LeSprd2xWvgLIY7HcpZc3/cc+mN/YbXxYZ1iDgSsjTYSg4RDzfWksEjIA88eEkiRRh6wHsN+E= 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=PwZX8EOM DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 986B74BB3BBB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1790680908; 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: in-reply-to:in-reply-to:references:references; bh=z/H4FWX1Fd7FSYU406v3ZYrY11u93ejXBYPVFmTn0GM=; b=PwZX8EOMKV1Alr13tUqlikE/uEBTkAbOZ5+Qod5ZiW4ue13OhZLfDhCY8ucqcjkp8mo536 SfMoNEw6dApoMtkbJ99Z/UiwldbkETAnMZ2WbSwo/31c27lTAh2p2kFS1sTD9HjHHKnQvd sWiBKYd2tgO1xBWm2yqjjt7MN7f6ogM= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-347-1uNjYUGjNI-9UPQcvSlZbw-1; Tue, 29 Sep 2026 07:21:47 -0400 X-MC-Unique: 1uNjYUGjNI-9UPQcvSlZbw-1 X-Mimecast-MFC-AGG-ID: 1uNjYUGjNI-9UPQcvSlZbw_1790680906 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4a0023f2b97so11226875e9.2 for ; Tue, 29 Sep 2026 04:21:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790680906; x=1791285706; h=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=z/H4FWX1Fd7FSYU406v3ZYrY11u93ejXBYPVFmTn0GM=; b=j38V82r4UFWrFXWpqKTndLDdnsInFQTUqZQlh4XVLe+O4OFvnVAf5kl0MvqjZfwf6f zYqa25Gtk0CNBTh+BOaCFA4aEt/53wVX2HdBqteKPV1FFpfIpRiI9RhBzo4yjIplk8Gm n5FBNgVIc1gWDfR4h9P9z7bJoAMJ2KtlhnGrahXimKQxPOrKT7AO00YDonDzJgFMgoQ7 +9rmbVbBIkmVVoqfyr4EG4tiGcoEOBFfeAkc356O0jv2/SbRKuGdb3LmBQMIwGY72ptz XBy0+sCAYv4DkOzgqIkefuYbnPJ92RospjdNuVpnF5ZrqHucTVbdf+nTEcSAKvmlo/hB AnPA== X-Forwarded-Encrypted: i=1; AKwUvByNpPipAs2IwBa9DFCeft+7tJ9s86eLd29oRQAc/N6F5GjJxBoM70Sz4DLdXaWQjUE+fp2/T9HkZGXphA==@sourceware.org X-Gm-Message-State: AFuF++lbRTP1yPPHORLme552NB4bH+EXeBbxOPFGi/Z7oQLcJ/6NB0rh 7h/6TMCxvZ6PAmm2/2XSlT9FJxN8MuPQXGwlj4HYyu0GHMgoLHG+iJwc9kT4s81p62BsJSBXZ/z VDEByyH6tAQPjD4m0QTZG2hpo0gXUXhCL6clIxDU1cx24gOuws5bhC/DvoskrXYc9zMjutX8= X-Gm-Gg: AYBFou3+LYGjKWqY6vT+s/J+Wwbm/qWjLS3zJXqEmNIRseaowgJeFf3HFlWDy9FkLJb HJU23HOCcYlF4XsCiG2IErPGlVH7Msgsb8sDPZTbxv1CmfQq3v0AKjzGF8tv1GzA+Q+0nYdCnCe v3GaOd1xkUIX2BXBeLvNnAz7dSPZVNWo892nHTDz3xXjbv9WSgyuj5HLb3nfUVJIjwDuhUQpgmG tUrjCq+wGeggmYTDEWs0dryuD7k3ZX2qQcJO1wvgKl7M84WNrpytoIbdjVCe78fujt91k5T553p CDkTBuH4jVKrPSlYuNMviJ/lVEXaSIZhooDmhZsGxQAmREoYhpsNmVmAUlvFJJZA6tqa X-Received: by 2002:a05:600c:4e4c:b0:4a0:4c3:1da9 with SMTP id 5b1f17b1804b1-4a004c31db4mr105417475e9.19.1790680906249; Tue, 29 Sep 2026 04:21:46 -0700 (PDT) X-Received: by 2002:a05:600c:4e4c:b0:4a0:4c3:1da9 with SMTP id 5b1f17b1804b1-4a004c31db4mr105416985e9.19.1790680905854; Tue, 29 Sep 2026 04:21:45 -0700 (PDT) Received: from localhost ([213.31.44.29]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a00cfa57d7sm67587215e9.10.2026.09.29.04.21.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Sep 2026 04:21:44 -0700 (PDT) From: Andrew Burgess To: Simon Marchi , gdb-patches@sourceware.org Cc: Simon Marchi Subject: Re: [PATCH] gdb: make "stop-on-solib-events" a boolean setting In-Reply-To: <20260928195456.557337-1-simon.marchi@efficios.com> References: <20260928195456.557337-1-simon.marchi@efficios.com> Date: Tue, 29 Sep 2026 12:21:43 +0100 Message-ID: <87qzicz4jc.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ZJ_dx6Gn_kifwsKgKDxUE2gYJQFf6gFyDK94Yr3_kL4_1790680906 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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 Simon Marchi writes: > While reviewing a patch, I noticed that the "stop-on-solib-events" > setting was an integer, even though it is spiritually a boolean. It has > been an integer since it was introduced in commit 87273c713f0e > (1996-01-23). Make it a boolean setting. > > User-visible improvements: > > - The setting accepts the usual boolean values: on/off, yes/no, > enable/disable, as well as 1/0. > > - "set stop-on-solib-events" with no argument now turns the setting > on, like other boolean settings, instead of erroring out with > "Argument required (integer to set it to)". > > - Tab completion offers "on" and "off". > > - "show stop-on-solib-events" prints "on" or "off" instead of a > number. > > Possible breaking changes: > > - Integer values other than 0 and 1, as well as expressions (for > instance "set stop-on-solib-events $var"), are now rejected with an > error. > > - The CLI and MI output changes from: > > (gdb) show stop-on-solib-events > Stopping for shared library events is 0. > (gdb) interpreter-exec mi "-gdb-show stop-on-solib-events" > ^done,value="0" > (gdb) print $_gdb_setting_str("stop-on-solib-events") > $1 = "0" > > to: > > (gdb) show stop-on-solib-events > Stopping for shared library events is off. > (gdb) interpreter-exec mi "-gdb-show stop-on-solib-events" > ^done,value="off" > (gdb) print $_gdb_setting_str("stop-on-solib-events") > $1 = "off" > > - The Python gdb.parameter("stop-on-solib-events") function now returns > True or False instead of an integer. The Guile equivalent now > returns #t or #f. > > I think that all these observable changes are relatively easy to work > around. > > Add a NEWS entry for the change and update the documentation. I agree that this is a good improvement to make. I have two minor nits, see below, but otherwise: Approved-By: Andrew Burgess > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index a24f67cb8de1..5cfbad231402 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -22510,7 +22510,7 @@ The surrounding square brackets are optional. > @end table > > @table @code > -@item set stop-on-solib-events > +@item set stop-on-solib-events [on|off] This should use "@r{[}on@r{|}off@r{]}" which formats the [|] in normal non-code style text to make it distinct from the on and off, which will use @code style. Our docs are super inconsistent and I have a patch to try and clean this up but I was waiting for the release to be out of the way before posting it. > @kindex set stop-on-solib-events > This command controls whether @value{GDBN} should give you control > when the dynamic linker notifies it about some shared library event. > diff --git a/gdb/infrun.c b/gdb/infrun.c > index 3fbfeff9269d..59c25259fd52 100644 > --- a/gdb/infrun.c > +++ b/gdb/infrun.c > @@ -413,9 +413,9 @@ get_detach_signal (process_stratum_target *proc_target, ptid_t ptid) > > static struct cmd_list_element *stop_command; > > -/* Nonzero if we want to give control to the user when we're notified > +/* True if we want to give control to the user when we're notified > of shared library events by the dynamic linker. */ > -int stop_on_solib_events; > +bool stop_on_solib_events; The comment on this should really be: /* See infrun.h. */ Thanks, Andrew