From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id gGn2MhnoDmCWBgAAWB0awg (envelope-from ) for ; Mon, 25 Jan 2021 10:47:37 -0500 Received: by simark.ca (Postfix, from userid 112) id BF57C1EF80; Mon, 25 Jan 2021 10:47:37 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: * X-Spam-Status: No, score=1.9 required=5.0 tests=FORGED_MUA_MOZILLA, FREEMAIL_FROM,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,RDNS_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [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 61EDB1E945 for ; Mon, 25 Jan 2021 10:47:37 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BFE343857812; Mon, 25 Jan 2021 15:47:36 +0000 (GMT) Received: from EUR06-VI1-obe.outbound.protection.outlook.com (mail-vi1eur06olkn2084.outbound.protection.outlook.com [40.92.17.84]) by sourceware.org (Postfix) with ESMTPS id 308AD3857812 for ; Mon, 25 Jan 2021 15:47:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 308AD3857812 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=AUUB0Sf0Oe+MYOQU1YbyWR7Bb9gFfhydE7AO2XH+Bm7yjqKAfUPpvaLdGUk6Hxg0BgF/4QZ8vvOWjg7Zk9cjeNcN16plfloum9AgykHIkNJJ9wVUu0PXyZzrWWDsK6DlU1JqBGiBllA16TSz8slXKwvDgwOiY5TLZuDrHpl5HKHoj44oZtjOc19deUcv8y5qHgRgqYQl+/sq3IPj4LNcWRuHi8YwNYLVC/ojqNMPF/ud0MJg3vmZpGD06nZnaBcBI4rMvWVrb41oKBCBm4W+sI6JPyMFcbpBi51KzuMRkQDe5CZ9v/AKKv+SyanUdK1+oPx0AEILv6EGJUGUlI3EKA== 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=w+a7rvHQpkhH3yiTbju7KmERGb4Sbn1EjDnq1PQsQhw=; b=eP1ZKdFUAQDRNtZIeMLfyH+sNYAQuROIWhS4UJAJOF/F9/XBpFduj/5ZJYBau10SRUTlhjR8Ljf6MvLa3O2cznLr5mCRSCuc0PZpT0o80S8ncBzsS2XCD9LNTrm2/ZdkDwNS1AU+AAj3z3tAFMXOujGqx/iTFL320OtzcKWKfzJ1mea7ux8IzPt/sxyRDspjQH48+pzfscKXJH0IJL2G2ZvogRIb+QXaKN/U61b9NTJ0K92/MLKRr+k+mZad7qFT3xfC5CWlrd22n8GWPXIarO3r1Px+tNRyaPR4t0W9js2DvXfNtqM7Yh3n2U0Q92HqT7IC+7vkE5WjzWad3DofVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DB8EUR06FT060.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::51) by DB8EUR06HT178.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::216) 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 15:47:32 +0000 Received: from AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM (2a01:111:e400:fc35::42) by DB8EUR06FT060.mail.protection.outlook.com (2a01:111:e400:fc35::295) 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 15:47:32 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:74E10E0BF6176CECBF204BD4CF10CF1C202EF332F9793E961D18A4F8EF3C5171; UpperCasedChecksum:18CDA9F6ADC0B26BB4FEF4F2A83974C49ECFEF58F80EA05EDCD370431D51A956; SizeAsReceived:8042; 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 15:47:32 +0000 Subject: Re: [PATCH][gdb/symtab] Handle DW_AT_ranges with DW_FORM_sec_off in partial DIE To: Tom de Vries , Simon Marchi , 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 16:47:30 +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: [tAJdaEZztYi5fdePYlWCLXS1c9b70m0E] X-ClientProxiedBy: AM3PR05CA0155.eurprd05.prod.outlook.com (2603:10a6:207:3::33) 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 AM3PR05CA0155.eurprd05.prod.outlook.com (2603:10a6:207:3::33) 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 15:47:32 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: ae0f796c-c603-4c6c-3955-08d8c148874e X-MS-TrafficTypeDiagnostic: DB8EUR06HT178: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hlsz6JnFcFAUVnGrPLftkv+ozPXJu26/feU3jdcYvzSmA02q1sREeBaa5VpAbdvFQA90ljcJvDScZ9RhlHqc4sHip7Pwfggx0GDeqCYB0hhaY6WP5NKkjbc0uv3FIxGORoHS8XPpNAzxSE5Gf7Hg/g8xAcUc+kJFOx1qL5PcIDgaVnxbU2LUjFZvkMzh3dDTkqjxnbfSPTmcwE68JCYsSXQFh2v57dc3OMXwzyotuJBYQYm9Xw0nl11nb5Cyn1rPqc+dPgLhUTJ70LMxjiv7dFGvnLGTUa9ht9sKZ8xphy4= X-MS-Exchange-AntiSpam-MessageData: usCQ/4ob1jQ6CR6s6C5exOmVuG57nmnYtO4QnUbRPnWg36M2i9zsmw3COPwJMFjIbqs5GT5JT5iDvcEnUXY/vZ9B3/CtBQKC7brI6IdugIVfBJ0ulZW+98/AXAQpRHSWB/sCgh4em3YBKoGDhic36g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae0f796c-c603-4c6c-3955-08d8c148874e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2021 15:47:32.7161 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB8EUR06FT060.eop-eur06.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: DB8EUR06HT178 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 4:37 PM, Tom de Vries wrote: > On 1/25/21 4:27 PM, Simon Marchi wrote: >> >> >> On 2021-01-25 7:52 a.m., Bernd Edlinger wrote: >>> On 1/25/21 1:24 PM, Tom de Vries wrote: >>>> Hi, >>>> >>>> While looking into a failure in gdb.go/package.exp with gcc-11, I noticed that >>>> gdb shows some complaints when loading the executable (also with gcc-10, where >>>> the test-case passes): >>>> ... >>>> $ gdb -batch -iex "set complaints 100" package.10 -ex start >>>> During symbol reading: Attribute value is not a constant (DW_FORM_sec_offset) >>>> Temporary breakpoint 1 at 0x402ae6: file gdb.go/package1.go, line 8. >>>> During symbol reading: Attribute value is not a constant (DW_FORM_sec_offset) >>>> During symbol reading: Invalid .debug_rnglists data (no base address) >>>> ... >>>> >>>> Fix this by using as_unsigned () to read DW_AT_ranges in the partial DIE >>>> reader, similar to how that is done in dwarf2_get_pc_bounds. >>>> >>>> Tested on x86_64-linux. >>>> >>>> Any comments? >>>> >>> >>> Oh, interesting. >>> >>> This is exactly what I have posted here: >>> >>> https://sourceware.org/pipermail/gdb-patches/2021-January/174660.html >>> >>> but my test case shows the regression in the partial symbols. >>> >>> >>> >>> Maybe you can take my test case and merge it to your patch? >>> >>> > > I've looked at it, but it's optimized code, which may be fragile in > terms of number of break locations. I wouldn't mind a dwarf assembly > version of that one though. > 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? Thanks Bernd. >>> Thanks >>> Bernd. >>> >> >> Haha, I also wrote the same patch: >> >> https://sourceware.org/pipermail/gdb-patches/2021-January/175225.html >> > > Heh, this starts to sound a lot like a "how many software engineers does > it take to fix one line of code" kind of joke :) > >> Either of your patches is fine with me. Note that the test that I add >> later in my series (written with the DWARF assembler) triggers the bug >> as well. > > Ah, that's good to know. > > I've push mine, and added you both as author in the ChangeLog. > > Thanks, > - Tom > >