From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2058.outbound.protection.outlook.com [40.107.103.58]) by sourceware.org (Postfix) with ESMTPS id 3E0733857025 for ; Wed, 26 Oct 2022 11:58:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3E0733857025 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=b8BO1vYmt3hQmidVS6vC7erM8D7+Zv8i7E7cg18VZQ1bymEeqH8MciJXzWCOhgtGDquJiX5oSuEokGnfsGvK0CyjMuSDdudeXtX5yzF5As6kIXgTpcGdwEmLjlYMvSxmT8UYqOFdpHQ9U1fxK5mMkxbKcamqvl1ma+hT4aBA5EmNtwVwvbPV5d7SOD9FMucUXuBGl+FX3qcYw3Hz+SsC9k+qRCTbao2UIxz+CVCMc7IzK6DruiYKN6F0RpYYDpaMM2Asbg3BvsUKKXOIp7UEB/d+XZ4/BMWlw3UCxS0gt+VAV6pIwjwUPg3TV3N6K7ktYyI4FEEtbYip65AkyzQwQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Bgc1YPNxB1TTTlf5Bxcp6zYaQsFmWbBO4Kvt40Tkf2k=; b=H8/HBBg60hpqYsVBEkJyU45Ieml0N1ezIQ4Hg48C6rHt6RdrHDrdPf9rXyx0rzN/VBSeDkoXbjhtiPrf/XwXP8CQYjjRo+qF60VgwtrH1RAn3H3+RQeuE9GYyciHzaYq2hZ0mCZrRjKcemzVDnb0snlheac2+lV+0rYArCbjKe6sMu7tFSUlOeXnWrhXbb21DuwG11Nczyen+/FtjrYZtCP3QmPoQGXsq5Zv1CapWY1auKq444s+wqrD+XP85D5Getr1mfmNRV1TSjIZXUuuzBkSIlrm1tE++T28f5jU7RUF54C51txQjUPA9jHjM9r6OabKMhqosC2SfRCKkMfe2g== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Bgc1YPNxB1TTTlf5Bxcp6zYaQsFmWbBO4Kvt40Tkf2k=; b=HxbLKHVDptB28rH+QegneuL7P4AURTrbeDYNeeZMsvg1KwShyiiNGDlrYRsUMYh8cV/PXMfiLPkZswtvlWDnSWZhk1HaSlF9nLCm8Qvo6U9nDWuBTiP7uTdtyTnqNGzAVGW9VKRkoarvqjP/uypuzxbME5QNSRjJoSJHY4Tu24g= Received: from AS9P250CA0013.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:532::24) by PA4PR08MB6207.eurprd08.prod.outlook.com (2603:10a6:102:f2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Wed, 26 Oct 2022 11:58:23 +0000 Received: from AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:532:cafe::7e) by AS9P250CA0013.outlook.office365.com (2603:10a6:20b:532::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23 via Frontend Transport; Wed, 26 Oct 2022 11:58:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT037.mail.protection.outlook.com (100.127.140.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.20 via Frontend Transport; Wed, 26 Oct 2022 11:58:22 +0000 Received: ("Tessian outbound 2ff13c8f2c05:v130"); Wed, 26 Oct 2022 11:58:22 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8a3f4f99e76419a2 X-CR-MTA-TID: 64aa7808 Received: from aa768e418dcf.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F77BD7A6-3E39-4023-B4B1-8627BE66EE4A.1; Wed, 26 Oct 2022 11:58:15 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id aa768e418dcf.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 26 Oct 2022 11:58:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mkjCaUejpQG4V7PO3ppOswo2L4UAkVdN7L5tJtpXvltn8rHmSP03yTSC4yzlHUo0z3RUeosH6//5CpouPte61z+au3go7xlqlgnvjzkntU1F9V9EFI0IICHecic4Z84vXoftzenIGLAFNxgaNiNzPhCvXMBAmgftrOSkQBg8PNyMDcUqg+mGcmggJn+7UmV25QFfm+R55JTtGZcZl6gkUUZmMiROC5RI0yQaecSRtHJ9p6eDEVv7N89uX1Bv4RhEigA3kJN1IG5+fZI9wJTFc/JSvzIJWFNhW46VlN2zle826Hyi02vPXN5RH6LVdYWt3FX8MkeDpvpSHTzZEvFxsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Bgc1YPNxB1TTTlf5Bxcp6zYaQsFmWbBO4Kvt40Tkf2k=; b=i4xEthJLiOttiqIzExh1D5x+h4pH6BUKBlcvBSkLtsqsTopuBn0gRwyGwf66CV7+N5s1yMyVqKLLPZ8k4D4lleaMw9jiwpXpAAlGym9TrFBQPf3vFMqIyt5UpWK35hwkNZyofD0lF1mEVdpnNN2LVAd7isH3iFVTuzVTBvJ27w8Q2CYn0qC2LMN1cvPj5R2P6rBif7VEKS5fklhdMjy/tRUfl3dV0z0Q/qW++AoIKMnFqPUtXAAn6xrfu6/XD0j3mks2RI5Z0dHM+OPPAE50tCBc3NeM+dQofiAqljhGJ1OQoRNisYJx026rOaSHupHOW7LZW9rq38l7GG5L9Rt2KA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Bgc1YPNxB1TTTlf5Bxcp6zYaQsFmWbBO4Kvt40Tkf2k=; b=HxbLKHVDptB28rH+QegneuL7P4AURTrbeDYNeeZMsvg1KwShyiiNGDlrYRsUMYh8cV/PXMfiLPkZswtvlWDnSWZhk1HaSlF9nLCm8Qvo6U9nDWuBTiP7uTdtyTnqNGzAVGW9VKRkoarvqjP/uypuzxbME5QNSRjJoSJHY4Tu24g= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by AS2PR08MB8456.eurprd08.prod.outlook.com (2603:10a6:20b:55c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.36; Wed, 26 Oct 2022 11:58:13 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::7f57:1601:9b18:7529]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::7f57:1601:9b18:7529%7]) with mapi id 15.20.5746.028; Wed, 26 Oct 2022 11:58:13 +0000 Message-ID: Date: Wed, 26 Oct 2022 12:58:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v6 5/8] GDB/Python: Use None for `var_zuinteger_unlimited' value set to `unlimited' Content-Language: en-US To: "Maciej W. Rozycki" , gdb-patches@sourceware.org Cc: Simon Sobisch , Tom Tromey , Andrew Burgess References: From: Luis Machado In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SA1P222CA0053.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:2d0::27) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|AS2PR08MB8456:EE_|AM7EUR03FT037:EE_|PA4PR08MB6207:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e771d95-d8a2-4a3b-a806-08dab74961f1 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: r/En0rnNYB8LWV+Y7LjpksNcT1ceLtVsjjvfRnDX/ATsESqcuZt0EvTEaUd7+uz9EfjtZxWke4G3AYLwj3dV4oeZVS9B/o1agvU+y4JCcBnLSrY1MqTumxkcvklOug9Rcb2kLG8vvglcZREhUvA+1+zNL/OsqNhN1I1IFPKKwyAOrVQ5diCyCN88ByiuRA59w253z6nFmm6j3xDOZntf8dVFIVS+QFpkuudb/DYM1S4R85E3OvHL5Cgu0JfuS5I+seWs4FM20D6dAH+Ma2WeSuSe6ydcF//sEfpG7t2bqNlZzTkreZNq5edCaIlG7DEI9dKxx+yo9w1rKjs3UmJU0l+LN62IVRVl4862dO4ifPMAGNygK7UrT7TlpeK8KoIuLo+TngAh+AWVbNFqEtJmz9Ut8ew6OYuyxnyNvYgC+EWjgnsIJfVuxfMonms3hmyeQvmtxWP1TX5olhCsxllwwzoOnJWUaA3uxDuehKAuzgkOEoZJYekwrTQgtANVg5UZ7tZ+ED3UOkxNl4Xxe/JYJfMKU9Gwd1hJjZqfCKNseoN1x9Y7iKxaHvDF06htfxh/nQUqHAR1i9dtvFNR3zUvs92WrZFnfgBsUvfoB1iht1gzvWmMM80Qr2/kIXZbmCADXj8notMYT9+XCVGWA/ynD13Rw9T3P/dy4q2HPcdq1b5Vc6glIdRI1MqdrtyU04/3afqs4pYAhIms2rhO56aJjAfidzzgRYAYM+uZNy5XShucFsmZbgYD4zT6L/lycTTv3sBG9AUZoEwiN3OLozYco6M4Io854L6noU+0X+6Hrs+Sw44sV0ygxK8aXtoS0IeJdg1RlIqiu2v7jaAilvjnEg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB3919.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(39860400002)(136003)(396003)(366004)(376002)(451199015)(26005)(41300700001)(8936002)(6512007)(5660300002)(66946007)(6666004)(54906003)(53546011)(66556008)(36756003)(4326008)(66476007)(6506007)(316002)(44832011)(38100700002)(8676002)(30864003)(2616005)(186003)(2906002)(83380400001)(86362001)(31696002)(31686004)(6486002)(478600001)(84970400001)(81973001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8456 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 18c067bf-b3ef-4554-6a7a-08dab7495bef X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5prS1PBt814Sx2qJObI6B7TvQgAQnDvCizYv4ZN3jpr+7TBzZGY7wWTIBhdi5HmsiFtlTkD5Y/kuYvvG2KnD14wtSon6Bl8cWQ1IkVoM3VmrSjIgJSLXqr6BI3Vu6c3JGMiR+ijSkx9l2dDQK0YfMBm5p9NUdn7aSILjCof//qFNx3Wwq+eEoj18rXTOFwNbsLAQpwmx2Fn0G1CXHrhuwugrIXIN56wxhwO0Rrz3jaP79JqT3RaXb4fNEyZLQGz8elwgaL6RmvUkhjCpo0a9XkOj86TKhgQrgHI1/vUeuJ1oDvd38UmI3M7uDAY2ETH8/0rWMahcGj8Gz3GpjwSbRUCBwVyThrUMom0+gVd+Hx2iJbrpw4/pg5hEjCzGFSkB+h2uRN2kkHrItOYz0jyGOgJGNPfnJod5BIDFGjgdj+OhNH4iZ4FaC+fuMRCOvy3jldafJ0OTxVO6NLecsbcIOk1Jmd49ogoA5cVucXOBNk5++N/q2r5OWxUki+Y5JznQpsyKyiN5kZPS+2hjAQsVkieILYeLRd0XYjMbQAIK+oivzNgdBEFyTLZG7JffuT2ROpKZbi02g8NzRmt/ZfiIqMuTKUnMPCGoxs/kDeyI3t+PybXuhNEB1vgFCsGfM7+A8YuVZ1VEb7cpVZ3AbEa/MSQOIiVI6HJoCoPLypRdHjzVg7yQdVBPkA5SDM2WxeZFlX034itU10uo5tz0KSXMNrbJDHDS8zgo4KIORXG20DWyI34E7ChSr64P1nDnjAVdLvd7FnOtO4FPrBLO/j6rhNjEkwHRKcnefOqKSI3sLRonlgEkECw8UvSi6BetYajSWNVVMxKYDlTXfpC7kyLHWKDb1kxNa2vIH63F/uvs6Go= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(346002)(136003)(396003)(376002)(451199015)(36840700001)(40470700004)(46966006)(81166007)(82740400003)(478600001)(2906002)(356005)(186003)(44832011)(84970400001)(31686004)(6486002)(54906003)(107886003)(6666004)(82310400005)(70586007)(70206006)(41300700001)(4326008)(316002)(36756003)(53546011)(6506007)(8676002)(6512007)(30864003)(26005)(40460700003)(2616005)(8936002)(5660300002)(36860700001)(47076005)(336012)(86362001)(83380400001)(40480700001)(31696002)(81973001)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2022 11:58:22.9288 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e771d95-d8a2-4a3b-a806-08dab74961f1 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6207 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,KAM_ASCII_DIVIDERS,KAM_DMARC_NONE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, I'm seeing a number of new failures on armhf Ubuntu 20.04 for both gdb.python/py-format-address.exp and gdb.python/py-parameter.exp. Since this series touched those, I'm wondering if those are known. FAIL: gdb.python/py-format-address.exp: symbol_filename=off: gdb.format_address, result should have an offset FAIL: gdb.python/py-format-address.exp: symbol_filename=on: gdb.format_address, result should have an offset FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: test default value FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: test default value via gdb.parameter FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: test set to 0 FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: test set to 1 FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: test set to 5 FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: test value of -1 FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: test value of -1 via gdb.parameter FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: test value of -5 via gdb.parameter FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: test value of 0 via gdb.parameter FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: test value of 1 FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: test value of 1 via gdb.parameter FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: test value of 5 via gdb.parameter FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: test value of None FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: test value of None via gdb.parameter FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: {test set to -1} FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: {test set to -5} FAIL: gdb.python/py-parameter.exp: test_integer_parameter: kind=PARAM_UINTEGER: {test set to None} On 8/17/22 23:04, Maciej W. Rozycki wrote: > Consistently with parameters of the PARAM_UINTEGER and PARAM_INTEGER > types return the special value of `None' for a PARAM_ZUINTEGER_UNLIMITED > parameter set to `unlimited', fixing an inconsistency introduced with > commit 0489430a0e1a ("Handle var_zuinteger and var_zuinteger_unlimited > from Python"); cf. PR python/20084. Adjust the testsuite accordingly. > > This makes all the three parameter types consistent with each other as > far as the use of `None' is concerned, and similar to the Guile/Scheme > interface where the `#:unlimited' keyword is likewise used. We have a > precedent already documented for a similar API correction: > > -- Function: gdb.breakpoints () > Return a sequence holding all of GDB's breakpoints. *Note > Breakpoints In Python::, for more information. In GDB version 7.11 > and earlier, this function returned 'None' if there were no > breakpoints. This peculiarity was subsequently fixed, and now > 'gdb.breakpoints' returns an empty sequence in this case. > > made in the past. > > And then we have documentation not matching the interface as far as the > value of `None' already returned for parameters of the PARAM_UINTEGER > and PARAM_INTEGER types is concerned, and the case of an incorrect > assertion for PARAM_UINTEGER and PARAM_ZUINTEGER_UNLIMITED parameters in > the sibling Guile/Scheme module making such parameters unusable that has > never been reported, both indicating that these features may indeed not > be heavily used, and therefore that the risk from such an API change is > likely lower than the long-term burden of the inconsistency. > > And where the value read from a parameter is only used for presentation > purposes, then such a change is expected to be transparent. > --- > Changes from v5: > > - Refer to Python parameter types in the change description rather than > underlying GDB variable types in preparation for breaking the tight > coupling between the two later in this series. > > - Document existing and updated semantics in the GDB manual. > > - Update the testsuite adjustment to fit in the now expanded test case. > > - Add a NEWS entry. > > No change from v4. > > New change in v4. > --- > gdb/NEWS | 7 +++++++ > gdb/doc/python.texi | 30 +++++++++++++++++++----------- > gdb/python/python.c | 10 +++++++++- > gdb/testsuite/gdb.python/py-parameter.exp | 16 +++++----------- > 4 files changed, 40 insertions(+), 23 deletions(-) > > Index: src/gdb/NEWS > =================================================================== > --- src.orig/gdb/NEWS > +++ src/gdb/NEWS > @@ -175,6 +175,13 @@ GNU/Linux/LoongArch (gdbserver) loongarc > gdb.BreakpointLocation objects specifying the locations where the > breakpoint is inserted into the debuggee. > > + ** Parameters of gdb.PARAM_ZUINTEGER_UNLIMITED type now return the > + value of None for the 'unlimited' setting, consistently with > + parameters of gdb.PARAM_UINTEGER and gdb.PARAM_INTEGER types. > + Parameters of all the three types now accept the value of None > + to mean 'unlimited'. The use of internal integer representation > + for the 'unlimited' setting is now deprecated. > + > * New features in the GDB remote stub, GDBserver > > ** GDBserver is now supported on LoongArch GNU/Linux. > Index: src/gdb/doc/python.texi > =================================================================== > --- src.orig/gdb/doc/python.texi > +++ src/gdb/doc/python.texi > @@ -4598,14 +4598,16 @@ Python, true and false are represented u > @findex PARAM_UINTEGER > @findex gdb.PARAM_UINTEGER > @item gdb.PARAM_UINTEGER > -The value is an unsigned integer. The value of 0 should be > -interpreted to mean ``unlimited''. > +The value is an unsigned integer. The value of @code{None} should be > +interpreted to mean ``unlimited'', and the value of 0 is reserved and > +should not be used. > > @findex PARAM_INTEGER > @findex gdb.PARAM_INTEGER > @item gdb.PARAM_INTEGER > -The value is a signed integer. The value of 0 should be interpreted > -to mean ``unlimited''. > +The value is a signed integer. The value of @code{None} should be > +interpreted to mean ``unlimited'', and the value of 0 is reserved and > +should not be used. > > @findex PARAM_STRING > @findex gdb.PARAM_STRING > @@ -4635,21 +4637,27 @@ The value is a filename. This is just l > @findex PARAM_ZINTEGER > @findex gdb.PARAM_ZINTEGER > @item gdb.PARAM_ZINTEGER > -The value is an integer. This is like @code{PARAM_INTEGER}, except 0 > -is interpreted as itself. > +The value is a signed integer. This is like @code{PARAM_INTEGER}, > +except that 0 is allowed and the value of @code{None} is not supported. > > @findex PARAM_ZUINTEGER > @findex gdb.PARAM_ZUINTEGER > @item gdb.PARAM_ZUINTEGER > -The value is an unsigned integer. This is like @code{PARAM_INTEGER}, > -except 0 is interpreted as itself, and the value cannot be negative. > +The value is an unsigned integer. This is like @code{PARAM_UINTEGER}, > +except that 0 is allowed and the value of @code{None} is not supported. > > @findex PARAM_ZUINTEGER_UNLIMITED > @findex gdb.PARAM_ZUINTEGER_UNLIMITED > @item gdb.PARAM_ZUINTEGER_UNLIMITED > -The value is a signed integer. This is like @code{PARAM_ZUINTEGER}, > -except the special value -1 should be interpreted to mean > -``unlimited''. Other negative values are not allowed. > +The value is a signed integer. This is like @code{PARAM_INTEGER} > +including that the value of @code{None} should be interpreted to mean > +``unlimited'', except that 0 is allowed, and the value cannot be negative. > + > +In GDB version 12 and earlier, a parameter of this type when read would > +return -1 rather than @code{None} for the setting of ``unlimited''. > +This peculiarity was subsequently fixed, for consistency with parameters > +of @code{PARAM_UINTEGER} and @code{PARAM_INTEGER} types, so that all the > +three types return the value of @code{None} for ``unlimited''. > > @findex PARAM_ENUM > @findex gdb.PARAM_ENUM > Index: src/gdb/python/python.c > =================================================================== > --- src.orig/gdb/python/python.c > +++ src/gdb/python/python.c > @@ -509,9 +509,17 @@ gdbpy_parameter_value (const setting &va > Py_RETURN_NONE; > /* Fall through. */ > case var_zinteger: > - case var_zuinteger_unlimited: > return gdb_py_object_from_longest (var.get ()).release (); > > + case var_zuinteger_unlimited: > + { > + int val = var.get (); > + > + if (val == -1) > + Py_RETURN_NONE; > + return gdb_py_object_from_longest (val).release (); > + } > + > case var_uinteger: > { > unsigned int val = var.get (); > Index: src/gdb/testsuite/gdb.python/py-parameter.exp > =================================================================== > --- src.orig/gdb/testsuite/gdb.python/py-parameter.exp > +++ src/gdb/testsuite/gdb.python/py-parameter.exp > @@ -346,22 +346,16 @@ proc_with_prefix test_gdb_parameter { } > "listsize" { > set param_get_zero None > set param_get_minus_one -1 > - set param_get_none None > - set param_get_unlimited None > set param_set_minus_one "" > } > "print elements" { > set param_get_zero None > set param_get_minus_one None > - set param_get_none None > - set param_get_unlimited None > set param_set_minus_one $param_range_error > } > "max-completions" { > set param_get_zero 0 > - set param_get_minus_one -1 > - set param_get_none -1 > - set param_get_unlimited -1 > + set param_get_minus_one None > set param_set_minus_one "" > } > default { > @@ -392,13 +386,13 @@ proc_with_prefix test_gdb_parameter { } > "test set to None" > > gdb_test "python print(gdb.parameter('$param'))" \ > - $param_get_none "test value of None" > + None "test value of None" > > gdb_test_no_output "python gdb.set_parameter('$param', 'unlimited')" \ > "test set to 'unlimited'" > > gdb_test "python print(gdb.parameter('$param'))" \ > - $param_get_unlimited "test value of 'unlimited'" > + None "test value of 'unlimited'" > } > > clean_restart > @@ -468,9 +462,9 @@ proc_with_prefix test_integer_parameter > } > PARAM_ZUINTEGER_UNLIMITED { > set param_get_zero 0 > - set param_get_minus_one -1 > + set param_get_minus_one None > set param_get_minus_five 1 > - set param_get_none -1 > + set param_get_none None > set param_set_minus_one "" > set param_set_minus_five $param_range_error > set param_set_none ""