From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 9D2F73856DC0 for ; Fri, 21 Oct 2022 18:44:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9D2F73856DC0 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 29LIimPM018655 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Oct 2022 14:44:53 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 29LIimPM018655 Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 4E13C1E0D5; Fri, 21 Oct 2022 14:44:48 -0400 (EDT) Message-ID: <1962a74c-690c-518e-0bfb-1d9fa2876847@polymtl.ca> Date: Fri, 21 Oct 2022 14:44:47 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v6 1/8] GDB/Guile: Don't assert that an integer value is boolean Content-Language: en-US To: "Maciej W. Rozycki" , gdb-patches@sourceware.org Cc: Andrew Burgess , Tom Tromey , Simon Sobisch References: From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 21 Oct 2022 18:44:48 +0000 X-Spam-Status: No, score=-3032.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2022 18:44:58 -0000 On 2022-08-17 18:03, Maciej W. Rozycki wrote: > Do not assert that a value intended for an integer parameter, of either > the PARAM_UINTEGER or the PARAM_ZUINTEGER_UNLIMITED type, is boolean, > causing error messages such as: > > ERROR: In procedure make-parameter: > ERROR: In procedure gdbscm_make_parameter: Wrong type argument in position 15 (expecting integer or #:unlimited): 3 > Error while executing Scheme code. > > when initialization with a number is attempted. Instead assert that it > is integer. Keep matching `#:unlimited' keyword as an alternative. Add > suitable test cases. > --- > Hi, > > Probably obvious, and shows how much use this code gets. > > Maciej > > New change in v6. Hmm, I see this failure now: guile (set-parameter-value! test-PARAM_ZINTEGER-param #:unlimited)^M ERROR: In procedure set-parameter-value!:^M In procedure gdbscm_set_parameter_value_x: Wrong type argument in position 2 (expecting integer): #:unlimited^M Error while executing Scheme code.^M (gdb) FAIL: gdb.guile/scm-parameter.exp: kind=PARAM_ZINTEGER: test-PARAM_ZINTEGER-param: guile (set-parameter-value! test-PARAM_ZINTEGER-param #:unlimited) This is with Guile 3.0, if that matters. Simon