From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id T/35FBUQvGqzehkAWB0awg (envelope-from ) for ; Tue, 29 Sep 2026 15:23:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1790709781; bh=TY4P4EdHBeHFf4gM45Pby71GwSPcw4N2AQfQBNDgzbI=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FXsLcfd6u6prTtal7RT8ZOPsI1OtT66TvmCjyTfKGJmvpCYTfXZbXRTSZtkW1xyua KbkTT9hJoIObo+LvMPJ9fjYuKG0uYCW0QrfPjvze8CUObXyawMjmbbjfhRN/KHv4yW 7ZUzChYW21bgLQ46S4r98kmlDR4kDWcPFXmsRIRs= Received: by simark.ca (Postfix, from userid 112) id 3F8931E051; Tue, 29 Sep 2026 15:23:01 -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=sBD8AK6e; 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 3BAFB1E01F for ; Tue, 29 Sep 2026 15:22:59 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5482A4B9DB49 for ; Tue, 29 Sep 2026 19:22:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5482A4B9DB49 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=sBD8AK6e Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 458744BA7993 for ; Tue, 29 Sep 2026 19:22:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 458744BA7993 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 458744BA7993 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=1790709754; cv=none; b=Xzvd37xFtNqbUYumFoVABa3sbeUZKjfEyAWnvsYqoR+H+EgtIYuXBAWUZUoAxaNm8HVyIWgR54Unwmby+DUnxrrxab0nDbh4PptCaoZHA6nq1vE1ymik3a/C69Hydx4EZwsK1vBYf/Fh6lc7uz3RThiTlveSO7iHlRzsfcfkSZI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790709754; c=relaxed/simple; bh=TY4P4EdHBeHFf4gM45Pby71GwSPcw4N2AQfQBNDgzbI=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=hgRCHfNj1yN+KnlkapM+fsJ3YEIEAnALDfBkU4miL53z9VxueGvbx/gRYW3nRPRqjk/DNnOTF2LBIzQ+tdlQT3Y9L7XO5cvVNe/KF+PgyzWzyZ++YYLDozOnKDBt/noiQ2yVwDPOPsdcLPDKFgyKK0lshCZYMFCiZFggZQxDlsw= 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=sBD8AK6e DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 458744BA7993 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1790709752; bh=TY4P4EdHBeHFf4gM45Pby71GwSPcw4N2AQfQBNDgzbI=; h=Date:Subject:To:References:From:In-Reply-To:From; b=sBD8AK6eceX5rTF2kt+klQj9gtb2XZTzKhtr6AEpXXfb8TwKSsr2f1EYLrwpj9Jur dqLQ3oniPF4cRsAHh4diAzAw6rSFOHxDMGkkl99FyiS6+fDRtti+hvruUQl3CTfgYH gengC/3Spu5eMJ76V8A6s89RNEwIVZVmSUFSOtYA= Received: by simark.ca (Postfix) id 777611E01F; Tue, 29 Sep 2026 15:22:32 -0400 (EDT) Message-ID: <323ee0c6-3b1c-430f-a52c-8182cdbc4c47@simark.ca> Date: Tue, 29 Sep 2026 15:22:31 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb: make "stop-on-solib-events" a boolean setting To: Andrew Burgess , Simon Marchi , gdb-patches@sourceware.org References: <20260928195456.557337-1-simon.marchi@efficios.com> <87qzicz4jc.fsf@redhat.com> Content-Language: fr From: Simon Marchi In-Reply-To: <87qzicz4jc.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 9/29/26 7:21 AM, Andrew Burgess wrote: > 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. Ack, fixed. >> @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. */ Agreed, it's a good excuse to clean this up. Pushed with those fixed, thanks. Simon