From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by sourceware.org (Postfix) with ESMTPS id 65C043858D32 for ; Wed, 27 Dec 2023 12:24:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 65C043858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 65C043858D32 Authentication-Results: server2.sourceware.org; arc=fail smtp.remote-ip=134.134.136.100 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1703679852; cv=fail; b=V/97xy74lDySmX7eg3Itx0BTNZUQg1TXoksEZFegoG1U9jFkdCCYImRi0kHTaN6OhK26uVzojOfbrlYpxL0py7J+7NpqRXLV3vvnNCjlhQD9pTIioGVnr71Yx9MmyNG85aJpNZLBq8kSiTQSa5ihTKoHy0Td5hfMxPmBz/KMHj4= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1703679852; c=relaxed/simple; bh=0884trhpNuhb8YSxNKdFa/211eLU2jSw4xVNqT6v1y8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ST0b421VcWXRqyopFwM9WCgSOg08g2SBRfkLJIVIjPsRst0a+lZDMj5UEB/B6iovVPPpxkaKQXiwSJT2c13QtnWF7EbPKpRgxTmhShDYosTIFOFfFFkP5bVJShBL6+e1nXW5R72wzuy+xn2sLoBtZSn0AeQ84VoZTHTdufbb9fA= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703679850; x=1735215850; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version:content-transfer-encoding; bh=0884trhpNuhb8YSxNKdFa/211eLU2jSw4xVNqT6v1y8=; b=hYH2oSo3W15l6l0/Cx12UtivMn03D2Dpsrhc+YbTLXGGlY7p2CWbhDT8 uz7iEQeTSOwewD/2USMv7CpeMSg1JsU/aZAXtYLun08rg8gMN3TWc0RBb z35onWMIOSPNuKiOmg3599AQ6lCGD3zSlYAN0WOAIks1mcMVouRllcX+r J8rytyzuQkBV7aLUtOf0QnHRg4vTu6/MBD+8/ndF8fUTZ28qfpgwn96dC 981Elb8LpKiwPOnLxTfb0NfRtwxbuula8qPxyC0tvH8Aj+C0Qaxnc2QPh iTCMJEPn28dNAjh92tCSKzoOjNwJqmjTCPEF/QPRaNWldOGR5q0Iow8eQ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10935"; a="462863519" X-IronPort-AV: E=Sophos;i="6.04,309,1695711600"; d="scan'208";a="462863519" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2023 04:23:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10935"; a="844144055" X-IronPort-AV: E=Sophos;i="6.04,309,1695711600"; d="scan'208";a="844144055" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga008.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 27 Dec 2023 04:23:48 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 27 Dec 2023 04:23:47 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 27 Dec 2023 04:23:47 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 27 Dec 2023 04:23:47 -0800 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.41) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 27 Dec 2023 04:23:45 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D9unmdrpIYbi3aRatS/HfSjUbtk59/jhSsUlhqd91sK0v0Z9/h1A2CDFhGyMwW2E6K9jbcm+0n3zUApKhtqoTlB8yEHZkU4Z+T0xK86I3sYnFco/TsV8r+SXXJ3E/pMJQumeqGOQiAmJyIoum50Ckk20gotxVgJxGJnGAMb9dNV7rTp0EnxeEbK/a5dSHg37AlADLhlStnPkoJfQysOIRIvutNXpK7brPai32fLmpVrzF9adXxPZD0MewW1kc4Mjs1QOakYVmetRfkRUdbJKulGbhZVa0r8O8PIxgI/LJKF6aCrOka/ukBVnJPKdjZnlbAz1Syjy8d3Y+aAYVQ+GrQ== 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=UBrhG8h1QJW48dP99y/Tc9flLqQ5FK2DdiSWHFiD7e4=; b=S9fiPcnfgVASy/nMH9MBo47m/OvIXO4Gxs4ROTbzvAxRPmnt3U1fsiwNyZBcgnpl/SWrlHeU3Y1YUeyptu+erV7Q4P5vtMeANt1cknC3bcEQbpevirnw/TRZL3Xn0AMsFf2FYoRjp5ecznSzkgHbqj6395bYXSKeoy6qzq+s3Wek51vgr8I54zam6DukEVAPnMeCoNAt9Ryr6zxVUdUYLt9y545jkC2COzgA9DLhkvmjvDLbXo5OymvRXUlbX4xKwnnIIH+94UC13xIVM4qzG1IR49hVomFXoZIW485znrd25qtuxOlxcfZQTt7bulhhT9yzbTCziSMCtnhpVcQL0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM4PR11MB7303.namprd11.prod.outlook.com (2603:10b6:8:108::21) by DS7PR11MB6245.namprd11.prod.outlook.com (2603:10b6:8:9a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.27; Wed, 27 Dec 2023 12:23:43 +0000 Received: from DM4PR11MB7303.namprd11.prod.outlook.com ([fe80::b960:9754:455d:b195]) by DM4PR11MB7303.namprd11.prod.outlook.com ([fe80::b960:9754:455d:b195%7]) with mapi id 15.20.7113.027; Wed, 27 Dec 2023 12:23:43 +0000 From: "Aktemur, Tankut Baris" To: Andrew Burgess , "gdb-patches@sourceware.org" CC: Eli Zaretskii Subject: RE: [PATCHv6 06/10] gdb: parse pending breakpoint thread/task immediately Thread-Topic: [PATCHv6 06/10] gdb: parse pending breakpoint thread/task immediately Thread-Index: AQHaJQyAxkSyt0Io6kG7ShR5XLkm27Cad3NwgAzVVgCAFecXoA== Date: Wed, 27 Dec 2023 12:23:43 +0000 Message-ID: References: <2b291071a7869e0ca69aa89d3f197c68512439c1.1701513409.git.aburgess@redhat.com> <87jzpii52j.fsf@redhat.com> In-Reply-To: <87jzpii52j.fsf@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB7303:EE_|DS7PR11MB6245:EE_ x-ms-office365-filtering-correlation-id: 1f22f328-eca0-4768-0f27-08dc06d6aaa7 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: oVpper/ofCtKbSSXnzprY/2yv1e52WJFJGJvOwzZjfZpgdzi9LExQIZ/AQSzcXyZM8UXgXN9S6IMLiqQIgxjjaWl1neGageW2pGJ49vULa6s/wBKJI/zZt7lvIPszmz/PcZ5XUb92SWGaaBCvK5ZRRxWh+TFTet57zVTMIeAWdYXM/GVyrd69j61EqXjzoT5bJ+dJMQw+nWTHcBmT8efKfrHPoU6Yalc2xumjz/PX8Sapf/3aAj0UU0PVHBy15ubBp+sAMdznbFXArWSR8vULsumH20tjst0jB/O+bvIvrmC5SNhK0jQJlor4rYy+/Ju0mu7Juz1S9OKzAjDCusUDoppdYk7pbMjDKITv/gENNWxO5qka9A2UAVQXMbCCiuApfDQxWueobhWo3aub1PXwsi1dfYpZHqfzTCxOC4Py1u6bnl4U7awR07AxZBTQDX+zz6tZFtekz+3Fm/HN37D1KRRrsrTCUIJ5F0vCMV1F8mM+MntztOBc5iKbujE0Bw6TWiMncD6s7afSG7hCuKElFqhHZ2SLhYSUzIPg15twDWQDUFyNBi6eI9ZGC3Uq+Q14i+FuGNSnUnsZBiXf7BnShgeiRmuBGstvplD7FY3GRGnR66AR5kLKCNHGnOJ8wXf x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR11MB7303.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(346002)(376002)(396003)(366004)(39860400002)(230922051799003)(1800799012)(186009)(451199024)(64100799003)(83380400001)(9686003)(110136005)(6506007)(7696005)(966005)(53546011)(14773004)(38100700002)(122000001)(82960400001)(55016003)(52536014)(66476007)(76116006)(66556008)(66946007)(316002)(66446008)(64756008)(71200400001)(478600001)(86362001)(8936002)(8676002)(26005)(4326008)(2906002)(5660300002)(33656002)(41300700001)(66899024)(38070700009);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?hl5n2DYl5y0LkKr2u71saLOvUt5KMnakMiLha2gTNOE9rXx5UIHkyIPzMnVj?= =?us-ascii?Q?YwjWQ3KKZ6O+5wFtGlAbAfvfbTQ5ua+NR539US6cheO1T5xoaUIQW6J3Jv4S?= =?us-ascii?Q?ErmeXlCtfSdF4cKmmLQ7wbYmYK1JJ9IYxrKXFUNGXwwR49Gaa3xYQh2S9ZUw?= =?us-ascii?Q?Oh2erDu6VKi4eutjfZrSw2rtRpE+8PGUi+MLl+6zQ7I3aa4xfBHxmsppUtyx?= =?us-ascii?Q?GJOfqiji3oBfEsUDEJkjPMX0DxBvVkYJgzazTWX3v+JdYY5qvsU/cQqAddwn?= =?us-ascii?Q?Tka604hB8HskWC3i/goUnOMSO4jNt6I/92FwnGfG05xtSxvWcxZdGuRH8PJC?= =?us-ascii?Q?2rqp7RSYuU7oXnHu3WICElm2RhLPCE6+suH5m4XN2CeWKettmVcCXFVKG1yC?= =?us-ascii?Q?RE0gqWMba+Zz7hGJbt2timwluCwz2ofHabc8naswmksldUxijrk14AonxBlG?= =?us-ascii?Q?jHfU7B/fAVJ9+Vdx0+camayvJi3Ktw9nJbww7s1RM08kRpSD79DcQ31cUrp6?= =?us-ascii?Q?i5cU7sgNqmkHB5Y6CBw6PjsSSAnC559TUJPIW1CyXD3yL+KXRw4zL0K2SWH6?= =?us-ascii?Q?d475MmSDAYAYMDIBlQ6W+fsCpcudbA0heTGKh8Vos1B/jk6c8AFAsJU0QPfc?= =?us-ascii?Q?oMkmLZ74mfMKPE9CiiEEb1DIZ6Br1TH3LmRqlBEeuHvA315Yai4wHC0lP3BO?= =?us-ascii?Q?BSZ5baP0iCYmib66x/8lC6qRdanwBQ3CXK8w1fQljn98xVFIVm1LzO0MID5W?= =?us-ascii?Q?qjZ8Z4q5v2m1KjlteLXe9GdZ4BcRRQfiJazboqagj8KF1xaVbus5D4Surufq?= =?us-ascii?Q?qL6575OuWzj7NBwuR01piX2SpelEcXQzWnhjDHw88p10uIhdx7hMxhPnWtp7?= =?us-ascii?Q?ExzrxkEgo8x5jL6N1lcvTPMr8xXqkZmD63TOB2RGBOhrhRH21z+U9I70ugFi?= =?us-ascii?Q?O3+1I4g2a7p5GwnlqmrkOJ/HqOSvkcNH6EtyVZVVo4+TBR4YHPmnKssOioGL?= =?us-ascii?Q?J8Jxq4D7pB6YXIg7LNtkNH6XHQ3x4M5Ow5NNyVuPcm7754+Jq8GUezII3vq7?= =?us-ascii?Q?ezA096DbZMn7nGx3MZVZH5p1q9H1D/ybGikEz7CCUXlH5DH0m7B4yg0R4fqe?= =?us-ascii?Q?my03E4WtxiV97YbIxMgJSWZ2OC75Do2oSqYfafRZFVpTjSE7dW+Dufd3NNVs?= =?us-ascii?Q?AIP5Cptyw6p04xbmtaYUeZP0hQTdwOMPdqecfELW9NbJTd1B8GTLakPYXXcz?= =?us-ascii?Q?OfEjAaphOOge5z8qj+zkjkjKtbezLiNOhNjh6+GiFWtgga5c/z/nSx3zncL4?= =?us-ascii?Q?glggrJmeFOZMTogF1LCAgAZ2Ysby71PcjvZMMNyM4ocnUcHwuGv8Ie/CKG+v?= =?us-ascii?Q?DH/A52W4GB/qrDJW8E9DXA0ai8L/x2MIIhsQAqAiS+fN4ksbyLxhPcN6yiZ5?= =?us-ascii?Q?ZWSEh40SNut+5ey5iV1aLh0Z89qB81hD70VtB0/AyDxxIaa5mUMeURydGSfA?= =?us-ascii?Q?LDGfe2cZ2WoDqGapmVEGt+5JsYCBLN2dOwZLsXshRTNny3cUCqfviV6zXuiY?= =?us-ascii?Q?pMu6II3ce48Fci69Qkl0dVd/T5F/SKO8wiCz4u1ed9qCb1L4ke8E8J+Q07Pp?= =?us-ascii?Q?5w=3D=3D?= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB7303.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f22f328-eca0-4768-0f27-08dc06d6aaa7 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Dec 2023 12:23:43.5135 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: PTJs6397w4bAIYXsw6LdaCBTDeOgt8rwgaSxMwc5NJjmd+S9Kh4vIo9MaiC6Z4F94y2kLiJQ40/ofQc5ncNJIo3QlAHZyIgRCricIasBeLI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6245 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wednesday, December 13, 2023 2:51 PM, Andrew Burgess wrote: > >> + /* The "-force-condition" flag gets some special treatment. If this > >> + token is immediately after the condition string then we treat th= is as > >> + part of the condition string rather than a separate token. This= is > >> + just a quirk of how this token used to be parsed, and has been > >> + retained for backwards compatibility. Maybe this should be upda= ted > >> + in the future. */ > > > > (I was the author of the -force-condition patch.) > > The quirks about the -force-condition flag were not a deliberate featur= e. > > For whatever it's worth, I think it's OK to de-prioritize backwards > > compatibility for this flag. I doubt that it would impact many users. > > > > In fact, in a post-merge comment, Pedro and Tom had suggested converting > > the flag to an option rather than a keyword: > > > > https://sourceware.org/pipermail/gdb-patches/2020-October/172952.html > > https://sourceware.org/pipermail/gdb-patches/2020-December/173802.html > > https://sourceware.org/pipermail/gdb-patches/2020-December/173999.html > > > > I (embarrassingly) did not have the opportunity to get back to it. May= be > > it's now the correct time to address the concerns? I can gladly help. > > What do you think? > = > I think this sounds like a good idea, but .... > = > ... I took a quick look at how this might be done, Thanks for taking a look! > and the problem I see > is that the current 'break' option parsing is buried within > string_to_explicit_location_spec, which is called from > string_to_location_spec, which is called from multiple commands. > = > Which makes sense, currently, all of the options for 'break' are about > specifying the location. > = > In contrast, -force-condition has nothing to do with the location, but > relates (as you know) to the condition. > = > We could handle -force-condition in string_to_explicit_location_spec, > but then commands like 'edit', which take a location, but not a > condition would accept -force-condition, and we'd have to have some > mechanism to the 'force' flag true/false value back out of > string_to_explicit_location_spec, either passing a container around, or > storing the 'force' state within the locspec... this all sounds like the > wrong approach. > = > Better I think would be to pull the option parsing out of > string_to_explicit_location_spec, and move it into the individual > commands. What we'd ideally want is to convert the current bespoke > option parsing (for location spec options) to use GDB's generic option > parsing mechanism. It's possible to bind multiple > gdb::option::option_def into a single gdb::option::option_def_group, so > we can imagine that the 'break' command would use a common > gdb::option::option_def from location.h, which defines all the location > spec arguments, and then a separate gdb::option::option_def which adds > the -force-condition flag. The only issue then is that we'd need to > pass the location spec related arguments into > string_to_explicit_location_spec somehow.... > = > Phew. Now the next problem is that the gdb::option::option_def contains > a list of gdb::option::*_option_def objects, the precise type of which > defines how the options are parsed. It we look at how the arguments to > things like -function are parsed, these get special language specific > handling, which the current option mechanism doesn't support, so I think > we'd need to add that, which will mean at least extending the option > process, or maybe even some reworking of the option handling... > = > All that is to say that I agree with Pedro that this would be better > done as an real option ... but I really don't want to tie this work to > that refactoring if at all possible... Yes, sure, given the non-trivial nature of that refactoring, this makes sen= se. Thanks -Baris Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva = Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928