From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by sourceware.org (Postfix) with ESMTPS id 1D2C93858CDA for ; Mon, 9 Jan 2023 08:12:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1D2C93858CDA 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=1673251950; x=1704787950; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version:content-transfer-encoding; bh=p5vI7Z+hTi2vbQkgUCD4pMfi/AQWUkIpmge/DKKN4ZU=; b=N57CDJK+i6lq5giOKSxCLcuvo9/FyK6MH1c1VdvKCFMt0u0si3ybWAVO Dj+56fIaUlZ2oGTFbBsCk88zDEq4HSLTvKVfTlbfnnCPhFl5/25D7LPFs yf0yT3tbqBeyDWroVcfIMA1u3+fAuWyVIO8lTdTcWayfnHX6+Vemf1H21 BR9xCyqc8hN2ImJ2FXuionvhG3LeK+TTzkE/7WV5E1LJuNzeXsIlKZphh BpE+glnCQ+9jArfEJp5MExEuJRtOGXAkgBZVp3wAQHJBWKmGhyqCIVYwR n4ZL+6ev4clOir4+Bk5QNT+OhTriHKkjbVuJXmT0laK4c0/4pC05//5I3 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10584"; a="409067780" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="409067780" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2023 00:12:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10584"; a="985320134" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="985320134" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga005.fm.intel.com with ESMTP; 09 Jan 2023 00:12:28 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 9 Jan 2023 00:12:28 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 9 Jan 2023 00:12:28 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Mon, 9 Jan 2023 00:12:28 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.104) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Mon, 9 Jan 2023 00:12:27 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IujbceHsG4HyHZ5MYfROBtgOoWOq27oJm8lXaGPbBP0QVL9aCChP3agq8VE08NbKs60oBjjD954h+po6/qk/fr6FanTSWfzUAwMH23LeHLl0e5vqXbMH7zNC4rLEh3FsVE4k+F0PiMBkzqjpyBm8maJK0Spw77NXbcX/BL3byxJCqLz5VtKGnZOwx3or1FDlvwux9a2v5mj1skglx29enESbhp90cs6jAzyGgqE5vmZeYEwqm+6C7nnqsRepH2lpf+fd2GQtUdp1L+Vr/vYCneYqO2IltzgfQSHe4B1Kb3rMl1N2xStJH1WAA/bE2FsfSRZIH3BesDrClLrqadXYlg== 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=vM2skuSRY11e/BzOIbt/ntSPAzusF7YNLZBQUcgrEN8=; b=PnkElll6vhfhAVKr25qkVK/k1ZjiOyhS/lyj3sPAdlUy8nzc2Mk49J7xERWnPzYODieXnTZmGCMeYdIbiVZKzbLCzc3RR/1ixyBh+K8I9Ysoqad5vteOi20F3bUkuFgn6hZ7EyD4Yxwpz8ulci2ff6KgXmKfnBMw6rYOWz5/lC/r8SB7u2gZRY3W8EgzzvNSKoxTwfbKwzmjLt65H8xp2LVNeG4nx4JgXXsB2ogoOOo2bOaqkYlx52kyDbVkrr4YaeWooNV7STPvsXPjOeeQ0TkpotUiNOe7V4U8HfzR26agQhl1htIHoBpqHkjtZRlXQZ0TNEo+/h+4rzC7+mw81A== 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 DM6PR11MB4564.namprd11.prod.outlook.com (2603:10b6:5:2a0::7) by DM4PR11MB5341.namprd11.prod.outlook.com (2603:10b6:5:390::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Mon, 9 Jan 2023 08:12:25 +0000 Received: from DM6PR11MB4564.namprd11.prod.outlook.com ([fe80::f3ee:1ff9:af37:b9ea]) by DM6PR11MB4564.namprd11.prod.outlook.com ([fe80::f3ee:1ff9:af37:b9ea%3]) with mapi id 15.20.5986.018; Mon, 9 Jan 2023 08:12:25 +0000 From: "Rohr, Stephan" To: Tom Tromey , Stephan Rohr via Gdb-patches CC: Simon Marchi Subject: RE: [PATCH v3 1/1] gdb/dwarf2: Fix 'rw_pieced_value' for values casted to different type. Thread-Topic: [PATCH v3 1/1] gdb/dwarf2: Fix 'rw_pieced_value' for values casted to different type. Thread-Index: AQHZFT34N8WrT8UwQE2lWykOr7gFDq6QVDACgAWCd5A= Date: Mon, 9 Jan 2023 08:12:25 +0000 Message-ID: References: <20221221131244.1287706-1-stephan.rohr@intel.com> <20221221131244.1287706-2-stephan.rohr@intel.com> <875ydkep2i.fsf@tromey.com> In-Reply-To: <875ydkep2i.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: DM6PR11MB4564:EE_|DM4PR11MB5341:EE_ x-ms-office365-filtering-correlation-id: 24b9864b-efd7-46f3-6525-08daf2193e29 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1k1oiIARjvQ29ikTotV9/CqfQ9ArA1JnEy95mOuCWIdYDY3jZznEJJtcnCIftrLkLNNjnv7MjXgpkq0FKX8V+KfDAZF9i0k3cvBWb5VWyrGUBmmgFpEzPABfHrH/Nramw2maIgwZqW0Z3oicXQOcMzNISqSmCWc15MnmXgy4bYMkpwlXffNbWT2ipaxEDlD2SUh0xTQbuPkdKJtfS4ER786gh4FLJLPxG88YhKkgSWP+Yg+byeJmDEHsfZaK7KWsW+N1V2w5CHdfWaZorJLLD+Cqef1x/txC3w8aunla3PoQHyhegkkUw7nlSp6gI2lzbC7gKyBvZNjIS3xONcBjG2m3r1yfsqpuq9P32CpU8hirPq5ZirwBLex02i8LL9g0G4ietV1Pq4UtteOEFJHhIOCScFIficfEpEpvr6BE9ivSnCa/sYUElaXZvhtGYRNqEfTHbWrSpjd+BE34WQ6fk/vMdkpiC0Z7x/eXZY10ZajKOjwe5IyPxDguV8NW5VFRLirpvDLcD2FhsoIQ0r2X/OWwwkJgjgWbCc6ai1+TrJIsIQ7Su6UptGHntOsQg1NFQKryVhVEIDmmoFcn4ZKPyvK7lo4E4WqyGcj4XPbcGE1b3X/WGA3shNDRk6PZitjHryDo9h3CVigDhDScJXxvQgNqC1qJkzzMId4HQHfzazHMWw/fnHDrDqPJytqyAI8npLFSZTQ1d1F9LXFNSOvkQA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4564.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(366004)(346002)(376002)(39860400002)(136003)(396003)(451199015)(2906002)(83380400001)(110136005)(9686003)(66446008)(7696005)(66476007)(66556008)(64756008)(5660300002)(66946007)(33656002)(55016003)(52536014)(26005)(186003)(53546011)(8936002)(122000001)(6506007)(478600001)(82960400001)(38100700002)(76116006)(8676002)(41300700001)(38070700005)(86362001)(4326008)(316002)(71200400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?W9AYOVhmta9mIRR1eTFb6kOzHrNx/LbI8UKYyaFDMAAJroDS3/OdmB4sA2pZ?= =?us-ascii?Q?KMsW4P82CZv4yoJwQETF5ZvzAXDXJVxrHGSb9Jr/D8QeMYL+fC5oYKwoYqCr?= =?us-ascii?Q?1pi6bIkydHAK0SjG8YufjBK8WKFO69Jq4jqQPZ71uhQF0JbVVw0GL6VNoDOU?= =?us-ascii?Q?bFHDQFRDLlib1pEFlyfTKimFg6PieFHh6xVizVYyWhRd7pkUFGmxR/gLzpEx?= =?us-ascii?Q?5A/TuFU2qGB0ggjwp9upTNKU3iILaTpnryjJ0o6PltEp+dHLvhajzO/l5B1q?= =?us-ascii?Q?UxoNky9JgcuHYw8b0z+dZEm+NWvcPamw6JJy+XrnPD5jiJxwp1zGSl9dXOOZ?= =?us-ascii?Q?9gv3TEElJwKmJWPc2fVTwCqbPK+w4A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-ascii?Q?q89CdHykRqjZ1UOqjA2NdEXIvUlFKohehmSp4QSKB70lYZK+dJKvaeTPmbVm?= =?us-ascii?Q?fEei9ysYs2YX2PwVEY+rWqD2uvSvf8x5+JQIe5e6h7jPFXppmU5WjHAR5zXg?= =?us-ascii?Q?yO2Zfyy4amx1Z0AHBnC99uCZQmu5EJYHSWx13Zz8hg5dPPRJkVsEAbWC/cgX?= =?us-ascii?Q?PDh9vZ9b0pj/fXW+2n+oIaPGCjFPzSV47Rxcufn20XA7u9Uq8OAb6QVS28QH?= =?us-ascii?Q?fqE7m2U5jw9Oimj2+9OsyHRBIhwk2nW9bLqHeODfibOJsJpKcZQ6+zvzq5Hv?= =?us-ascii?Q?zU2tZTfyVXrJFayVCyZ10STK/QGdDfswuYkd9v7v?= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4564.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 24b9864b-efd7-46f3-6525-08daf2193e29 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2023 08:12:25.6882 (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: FKO74AbNeXC9VqUd/u849LF4TdNr3qZfbR0I8kXkEkjX5rjtt779l9omFRmQIlSnXcs5DdZuJPVM0vfXbZmKOA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5341 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.8 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 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: Hi Tom. > -----Original Message----- > From: Tom Tromey > Sent: Thursday, January 5, 2023 8:53 PM > To: Stephan Rohr via Gdb-patches > Cc: Rohr, Stephan > Subject: Re: [PATCH v3 1/1] gdb/dwarf2: Fix 'rw_pieced_value' for values > casted to different type. > = > >>>>> Stephan Rohr via Gdb-patches > writes: > = > > From: "Rohr, Stephan" The 'rw_pieced_value' > > function is executed when fetching a (lazy) variable described by > > 'DW_OP_piece' or 'DW_OP_bit_piece'. The function checks the 'type' > > and 'enclosing_type' fields of the value for identity. > = > Thanks for the patch. > = > > If a lazy value is fetched, GDB allocates space based on the enclosing > > type's length and typically reads the 'full' object. This is not > > implemented for pieced values and causes an internal error if 'type' > > and 'enclosing_type' of a value are not identical. > = > > However, GDB can read the value based on its type. Thus, this patch > > fixes the previously mentioned cases by removing the check for identity. > = > I thought there was some other discussion & idea about the cause of this > patch... something like, setting a value's type should reset the enclosing > type? Or vice versa? I am wondering if you tried this approach instead. > = > Tom There was a discussion with Simon whether the value cast should update the enclosing type. Simon tried it out but as I understood he's also not clear= on what the right answer answers are. From my point of view, this would also be a separate patch. Thanks Stephan 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