From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 01nFHAQDD2AdCgAAWB0awg (envelope-from ) for ; Mon, 25 Jan 2021 12:42:28 -0500 Received: by simark.ca (Postfix, from userid 112) id 69CC51EF80; Mon, 25 Jan 2021 12:42:28 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=FORGED_MUA_MOZILLA, FREEMAIL_FROM,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id F02BB1E940 for ; Mon, 25 Jan 2021 12:42:27 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4B1EB385701E; Mon, 25 Jan 2021 17:42:27 +0000 (GMT) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2060.outbound.protection.outlook.com [40.92.89.60]) by sourceware.org (Postfix) with ESMTPS id 9A843385701E for ; Mon, 25 Jan 2021 17:42:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9A843385701E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=hotmail.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bernd.edlinger@hotmail.de ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ry/faE4eD6381lOMwKjLMn39+c0Vs3WgzWCoouuSnojyyyLjlDJxwgz6pa/nWRjyEUi40LPdO9Lk2iXFRf3bE9iKwtMAF5XUuSvwksmsQ2cjC5g04xVy9ARUpO9yzUltxNucUYpcaSLBrKVHY0+bZREJcU0vC3gPmCPcVC0i1uTmAXUVcNj1tmp8jv2899Iz5i01ZC83EKnpFnFXsCefcfDEYyuUX8RJsVcKBDWwPn/gvBIGgoHYbnrygOp+ZqIOKTJ7NqtQ0tLAF3jzGMZ5FWm0mlI9mBcC7ksX/N1jPbC6X2gHxFBOm2t/YBhgxb6zICdSVB9+5nutbglmoAOhkg== 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-SenderADCheck; bh=szDZAKxbm/uVZFCAvxqImW5DJwt8VmPhoC8wy4nMJzg=; b=QOkivmXy+KHr170Jq1LBAfiYpXsRmA+wjAYDnJa4B5esAnDd9l6kNM6U0aex/1/eFnLKJ8dddbdKY/83hgxqM9sk+W76RdSjGZL2SOMsaL18DlsZiSf/edEp3R/jN0+a+GS8ivMu9Np8c+iwF7x6e6bs7y+52ZzTzfU9QJqCcun17QOBcrUrqFeOJrBbj2Fy1wV0t+O2MNgeNM7u3aCZvP5tJfzDaNqhQxd2R+UaYr9TZq1xguIdC084yh41jNbAjtmxv1detQR0geDqsAOHQ+giHbApbkktMl2L2OdyfFbdpeRaK2M4qXqPfFfGkk3GJkmy0cm6B7xWx/pZs4IrVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from VI1EUR05FT054.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc12::48) by VI1EUR05HT131.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc12::238) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11; Mon, 25 Jan 2021 17:42:22 +0000 Received: from AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM (2a01:111:e400:fc12::4b) by VI1EUR05FT054.mail.protection.outlook.com (2a01:111:e400:fc12::144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11 via Frontend Transport; Mon, 25 Jan 2021 17:42:22 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:CF89EAC159B19D3B4AB8C6CD7FB5E5608B8BA8332A785A4CDE5C0555E8FEA205; UpperCasedChecksum:62651CA1082299FB6AF6FC12EAA1AF417DF8F9A0DE6CA53085F94ACF4B8EDAF9; SizeAsReceived:8186; Count:48 Received: from AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM ([fe80::7510:8a00:1c00:1147]) by AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM ([fe80::7510:8a00:1c00:1147%5]) with mapi id 15.20.3784.017; Mon, 25 Jan 2021 17:42:22 +0000 Subject: Re: [PATCH][gdb/symtab] Handle DW_AT_ranges with DW_FORM_sec_off in partial DIE To: Simon Marchi , Tom de Vries , gdb-patches@sourceware.org References: <20210125122444.GA15885@delia> <56f38801-477e-fa38-5e16-22a4ed73437c@polymtl.ca> From: Bernd Edlinger Message-ID: Date: Mon, 25 Jan 2021 18:42:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TMN: [vqO1T4DWahCqjQI6/SloBNIj0OOqhPUB] X-ClientProxiedBy: AM8P191CA0008.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:21a::13) To AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:364::23) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.101] (88.68.3.2) by AM8P191CA0008.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:21a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.12 via Frontend Transport; Mon, 25 Jan 2021 17:42:20 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: d7c4bf81-ee3a-49e6-4490-08d8c15891ab X-MS-TrafficTypeDiagnostic: VI1EUR05HT131: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dTPUbeEa9rYgPoZJ2PJQaS2x/tsR2HFlFjEFD1oyYCwrA8zgeOVfKeqryOQXp58ACFyN7/yt2NHR4sRyOj2m+wLosbPMRqFmzjeX1TSoHU8gb6BX9RoR5Eo5Rezp5DFhmBZKYk5OZBz1FK267zkv4vEoYI24vMowHlWirYqEtCYQj7YDs8DhSD1rHUIlRL1y3DYOeuPoAI6cmJezAl6bNi1gaScfoka0VXbrYrH09KycSoFcW5gtRWW8Z0Z5m6z10/++jkF57ay9HsqW8T0uB43LU4HXYtuea75Y26GoXJRcUu6ezmoTmUECOln4o+2CUpY2GQHRST0sjLxXwPfemBp7X0ZfOfdHgmHhXUMqEzA3NysvYVEZKw397QK4ISCZK/zD8GUnmDvyLBbcKRSj5qYb1SLDGV5tNbJT5s7X3Tw= X-MS-Exchange-AntiSpam-MessageData: EAG5uvKo1dOpEV/LZrujAe6sbt7FmTmUE0GV990u6JQYOvNDEf0k+Ks/qzCaogWsQh+w1/XieR4ngsXNGb7coK/DTk9Ml70uirUtPYgV0E6nb04NHXqERSNns//AIb3c0cydt4By4hA9pS+pUlEoKg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d7c4bf81-ee3a-49e6-4490-08d8c15891ab X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2021 17:42:22.0527 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: VI1EUR05FT054.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1EUR05HT131 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: , Cc: Tom Tromey Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 1/25/21 5:36 PM, Simon Marchi wrote: >> Yes, unfortunately I have not any experience with writing such assembly >> tests, but I am always impressed when one of you does it though :-) >> >> Nevertheless, the test case seems to be stable from gcc-4.8 .. gcc-11, >> that it fails without the patch and passes with the patch. >> >> So is it okay to push my partial symbols test as-is? > > My patch here adds a test that uses DW_FORM_sec_offset to point > to a .debug_rnglists (DWARF5) section. Maybe that's sufficient, > but if not I could probably do a DWARF4 equivalent. > > https://sourceware.org/pipermail/gdb-patches/2021-January/175229.html > Yeah, the hardest part on a one-line change like this is always the test case. So, I tried this patch on current trunk, but it fails: Running /home/ed/gnu/gdb-build-1/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp ... ERROR: Couldn't load rnglists-multiple-cus-dw32 into GDB (GDB internal error). ERROR: Couldn't load rnglists-multiple-cus-dw64 into GDB (GDB internal error). Running /home/ed/gnu/gdb-build-1/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp ... FAIL: gdb.dwarf2/rnglists-sec-offset.exp: is_64=false: p/x &foo FAIL: gdb.dwarf2/rnglists-sec-offset.exp: is_64=true: p/x &foo This probably means that your test tests more than this single-line change alone? I always thought that the partial symbols are replaced by the full symbols as soon as the first item from the CU is accessed, say "main". Can you explain how that can be? I was never able to get a reproducer for partial symbols with only one CU. Bernd.