From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by sourceware.org (Postfix) with ESMTPS id 66FF53858D39 for ; Mon, 13 Mar 2023 14:33:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 66FF53858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678718012; x=1710254012; h=from:to:subject:date:message-id:references:in-reply-to: mime-version:content-transfer-encoding; bh=UZLxZU+I8PvUS0f1a0uql9pDDyhJKV/4o0EFMguZ6EY=; b=Sj41YepqpfYe1+8Nu4rKOnhSJPcIWMDbljnyoVJ969X/LiGS09nBmpiz M24bn3qx6ozY5L9KEbYJLwoGtkaM5xelB4m7X2V/zUJh8AM0CLiBuqpF4 F6WQ5TjqebYSaqz3KEvZrjkjUdqnGuwrN4biWJVfJN5B7p3hDixGsY3JO UDGfucQro8DVaW2V6Eel8IjTMPz/hIRnXt06bENR3O/3dC3FTzjZE8QJ1 r+oX4g2CEhU2k2jfOz/nfkeF4Npy4cOADlLEi/aZvT/mm/AUJIzTvg6C/ O4erk10+UX7oRW2R5BJ00+Egw+6RHqm1LrgrDC4NaE+bPsU5JgqNe8prY g==; X-IronPort-AV: E=McAfee;i="6500,9779,10648"; a="364823687" X-IronPort-AV: E=Sophos;i="5.98,257,1673942400"; d="scan'208";a="364823687" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2023 07:33:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10648"; a="671919149" X-IronPort-AV: E=Sophos;i="5.98,257,1673942400"; d="scan'208";a="671919149" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga007.jf.intel.com with ESMTP; 13 Mar 2023 07:33:30 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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.21; Mon, 13 Mar 2023 07:33:30 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) 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.21; Mon, 13 Mar 2023 07:33:30 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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.21 via Frontend Transport; Mon, 13 Mar 2023 07:33:30 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.43) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Mon, 13 Mar 2023 07:33:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k9d5xiUjnjlUAFw/AJjSEBSzyTNwINi3rOn02pYEma6crdb7Onbr1P3nHlwnDhqUtOaGu+rftxwujmM/Hay2J+WAo6Kek8Ub5VIiQIK9xWyWYzF3+v/YTxS+qtYYh4hdcG5j9tOwMIVA3ZcbTDevmOOmPz0FyBwbvPJwSSZJVIpt1Xy082e8u+J6vbY4ZTSmTVxG+fqAMFSu9tQmEKg8/CNV/LMXIMVZJ8B6c2kSzMz+MBoiiAc7RRON7+0mgoYH2WnjfUS1HGFrRh5GyNJu/htkHcJrSZLnOHTRqdhbzEtMY7z1HUeIrS4d1Ghgy/pzvHbpiY/3XaApsIVyjFrHRg== 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=gbkcoCfI8V3KhAMFixGFsupdlLqMYpkdeuvhB+REWlE=; b=A8SZM8u8ZEo8ZIN4B5kaWZc9g5vtAxY727GL6nVSF8vRffCI2yKdlLNN2IzSwVJUFwWx81TFAKXEBSD3F7DTPsEHM/zAUKwkhB1jNC2czAPZ15Xcj+uAQAIBynDt5q3pBvkJuWZg+WoJZxiJW7mCMKxHXw73xScClR3kHI4sU5pynCMq6pr5zodjPgFcBIFHceBiYuzxqasJp5kc97HBVEb9Uel0bQMzGjSM8ie01eqjmNN/GrZij/7VH03Oq4wQdwIQforYLaZeIash0mw3lue+ZsVD5r7nwX5mtrQ4w3NPeD+rNgAyaFZTaXMunmfXW9jdZ4L/EUZYiREbW1J5wA== 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 IA0PR11MB7257.namprd11.prod.outlook.com (2603:10b6:208:43e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.24; Mon, 13 Mar 2023 14:33:27 +0000 Received: from DM4PR11MB7303.namprd11.prod.outlook.com ([fe80::cc2a:b1a3:91ad:780d]) by DM4PR11MB7303.namprd11.prod.outlook.com ([fe80::cc2a:b1a3:91ad:780d%5]) with mapi id 15.20.6178.024; Mon, 13 Mar 2023 14:33:27 +0000 From: "Aktemur, Tankut Baris" To: Tom Tromey , "gdb-patches@sourceware.org" Subject: RE: [PATCH 00/26] gdbserver: refactor regcache and allow gradually populating Thread-Topic: [PATCH 00/26] gdbserver: refactor regcache and allow gradually populating Thread-Index: AQHZS2fP5L13ubj/IUKt/TiV9FwiDa7v0yukgAkClMA= Date: Mon, 13 Mar 2023 14:33:27 +0000 Message-ID: References: <87edq0qorr.fsf@tromey.com> In-Reply-To: <87edq0qorr.fsf@tromey.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_|IA0PR11MB7257:EE_ x-ms-office365-filtering-correlation-id: ab902f62-095b-48bb-f507-08db23cfe8b0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mSwndl/6fNyh7/x9GbtNq0AsFE0CJU3TEa6iHd6totvEkJLZ1uiGUbEK8kepRBPopW+vY6fFCxy9hb8Yp36Rwue3+psQz8JeKfdtPXPZ4Dp9440f/jvSFY8vmMvMo6Th13UBjUAOfwDiC97iR0sGL0DtlPOaQrLU8tJjRk9Fw3UgM6kLISf0g0ooWy3RpAA3tRHvzMHmyzM2HcOzwPdI0N9mjpdmzmPg0njI1odLMXBQHI1zomH+fxGF9t2tnH0pM+s2PujHQ/KOpDYLti3MFrV8sYk9nYhF3kpgFXzI6ypz/Sl6Rj4+ACKkeJm/XTCci8eH+FLpgg9CIc7HySNa4aSgS8D4Wbewgq5DSlSovaqeTBZZ6rirb4rBKlDKgNviXSbXfb2ELPcqFtKYGjWArXJ09MUfAknnp/C+KnoL6Rt0p0p3X6HWmAt1uvHmzdzD1N16XH3sUcmAqGYJ8D896uIB6bfJHTaDMWcq+jEapeEIhrMKhtHcopQwOivLkd0IplhhDXU7aWTbVSPsNeISv/bM70sVJ0pJWQ913C8hnCrxUtefHKDCKaS8m2rCO3anKxRApHLPGkO2lGZRC2m4J18tXyD6CFWD/NPGc1TM3q86L9PlV/D+U4l2Pl504f3xrxwYLUqB9S7s2agNyfUm1LnX3eAh5QvTtjM58JeDbxVZ4+2ewx7JSPywzqDfh/aZ3jn0i+g/DM7FWY/Jws+thg== 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:(13230025)(39860400002)(366004)(376002)(346002)(136003)(396003)(451199018)(2906002)(82960400001)(9686003)(83380400001)(7696005)(26005)(71200400001)(5660300002)(53546011)(33656002)(52536014)(8936002)(55016003)(6506007)(186003)(86362001)(8676002)(38070700005)(41300700001)(66446008)(66946007)(66556008)(64756008)(76116006)(66476007)(122000001)(110136005)(38100700002)(316002)(478600001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?+cU46Si5PBe8B8GhS4H58ZzImbWIbFqqchWlSSYEICT5AeYbnI1L9g+k0sX6?= =?us-ascii?Q?s8kRKq7ZB4CjTnTb3ZXt77IJASZglbeOW7x42J8kGfcAPDogGTCBmlmVEn5G?= =?us-ascii?Q?Y3/6L/6XKhssoW26R/ymu/DjGZ59bfl+2x8N2s9Pm/+mVvn2NkS3wYu7yM89?= =?us-ascii?Q?+FgDoPyOBV2qRPEtZwREw4JKmk0RspXgRIlOANm2EjRMiILd6oA+uKzPquLq?= =?us-ascii?Q?pXQ8QlTSg9rUzPp99b4X779LRMNa6DsP7IezI04yTTdWd/IUA50JXl9S7TQm?= =?us-ascii?Q?YdxDmHQME8HuhyruzaNQqUVZs2yp9RMY3x4QxdTzFZDUAbGeQ71IpVjabb6a?= =?us-ascii?Q?o4TZL9w4bsJL0xY4EMNnmFA7mefDila9UTXwvxeiHRmv7UI2e/P6f2Lgg6bM?= =?us-ascii?Q?est3CnH1jD2Rl6eiNkUi6an690/L+2vIhEWguVAlg/AdQahQgZebRJyQ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RTXB/SFeiY4PvSc1mSmnaPojndaj?= =?us-ascii?Q?J1Fzu4YezCjq2UqV61hhWP0XOib7S8rI0b7z15HA2AB8tVYoML37TrG+sLHl?= =?us-ascii?Q?CHsouSb8z0EB977ZZ+1Al0xYw7n+z1osd47Iu1eusBCj245iXt7v7pEcO8pW?= =?us-ascii?Q?W7NBxduIYpLwZDRORhIzQW1n7pflHPqE6lo9n5GEPQgDmnqvcUPp/Cty6HsW?= =?us-ascii?Q?GwgrfByOiXkws3WAJzlVMasckY45p6CWavVgkzj29u9QXVVNx8tMF0qfx3y5?= =?us-ascii?Q?cQ=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: ab902f62-095b-48bb-f507-08db23cfe8b0 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Mar 2023 14:33:27.1858 (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: MerCBlELAdoDwfb06hwqXvErLb5KVWXgBQNBZ4MzCXlB2wb+gtJ7WFo/RjaapdnHVbOi+S6HrXG/PcNfMPG4gs+EI+V32Gk6azclm5fwh+4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR11MB7257 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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 List-Id: On Tuesday, March 7, 2023 9:40 PM, Tom Tromey wrote: > >>>>> Tankut Baris Aktemur via Gdb-patches w= rites: > = > > Gdbserver's regcache is defined and used in a way that it is either > > invalid or fetches all the registers from the target prior to being > > used. It also seems some regcache functions have two different contrac= ts > > based on argument values (e.g. a buffer being nullptr). > = > > This is an attempt to refactor the regcache in gdbserver to > = > > - convert several free functions to methods. > > - use and update register statuses more consistently. > > - allow populating register values gradually, instead of having to > > fetch all register values from the target. > = > I haven't read these patches, but I wanted to mention that, over time, > we've been trying to bring gdb and gdbserver closer together where > possible. And, I'm wondering how this series fits into this. At the > end, are the two register caches more similar? More divergent? > = > I'm not necessarily saying this is the most important thing, but for > example what would be unfortunate is if the two ended up with similar > functionality but very different expressions, which would make the > sharing of other code even harder. > = > Tom Hello Tom, The regcache implementation in gdb is a lot more involved with its relation to gdbarch, pseudo registers, values, etc. that do not exist at the gdbserv= er side. As far as I can tell, gdbserver's regcache can/should be compared wi= th gdb's reg_buffer. The series I posted does not strictly aim at sharing cod= e. But from a general perspective, I think it would be fair to say that the refactorings I posted bring gdbserver's regcache's behavior closer to the d= efinitions in gdb. E.g. the use of REG_VALID/UNKNOWN/UNAVAILABLE statuses and the mov= ing of free functions to class methods. For true code sharing, however, there = is much work to do, in my opinion. The series at the end introduces a REG_DIRTY status as a new state. This do= es not exist in the gdb side and could be considered a divergence. Regards -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