From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 1wtxEZ3xFmBzbQAAWB0awg (envelope-from ) for ; Sun, 31 Jan 2021 13:06:21 -0500 Received: by simark.ca (Postfix, from userid 112) id 375711EF80; Sun, 31 Jan 2021 13:06:21 -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 CC0BB1E945 for ; Sun, 31 Jan 2021 13:06:20 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2DFE63857815; Sun, 31 Jan 2021 18:06:20 +0000 (GMT) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-oln040092072109.outbound.protection.outlook.com [40.92.72.109]) by sourceware.org (Postfix) with ESMTPS id 4F87C3857815 for ; Sun, 31 Jan 2021 18:06:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4F87C3857815 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=KLDTT3UH/M8cs4psS1NQ9atEu9wDupONO5k2RafFLI5XpXx0/Owum/lyXuk17yrcsZzfTohUrk1VRHdIbhvrML5/wKZe3GCihZfxWZp+9ZHZpjEaOVhM3rKbpNNjj+5NECnLzklbNlM4a/tsoeX0p01YPmqoJ+v0hETgRXKB5431HIZ2wzORqE1KAptqlMlGum51wefMV96SyRU+oD8SirnQrdSjL6931nmqvbyIa4rTu6IaN6LGsy8s/uFFPhXwyfPW/zvklBEQSxDs42oSTrS/vPFoxvUCTSKr8tFwPcu4avPjgdJRm0Fu1qGJJoYyGyppPpqGocMgC0RpXEKJKw== 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=FLhE80tJfRWMKZMgzT3BPhLnCLZH1tJDskbtwklI2XM=; b=SL0Z/82y0C7+U2QErgL6VEbtRHzA1zGTVYn6JVNUhPoefgD0C/NiLvWjoatyNzAyajkyEj0pZ//4612r6OHkTaeBfY5JMLjCrhOuQpKIb2oisa7FFoa9pvGq8dUS3M/qdVniYckPwvPEmmGqkEMRL0TleaB5xa03NrNSIU133ffJCN5hc012mGcYhWYpRzeCyVpNca+h5CeX65mx8brigk4Lx9KLnn4ZlU3+0yViwdO8nP2Ik5/L+vyOGM1Di6lQgcwbyZnmb+NovmGsRaMEkUWIA7Zgd/dCPoNEa/n+FQG/z8S6PyyqLBIegDXrW0C5yGo2UJPk4Co+oaCdxNWuFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AM5EUR03FT022.eop-EUR03.prod.protection.outlook.com (2a01:111:e400:7e08::4e) by AM5EUR03HT204.eop-EUR03.prod.protection.outlook.com (2a01:111:e400:7e08::265) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11; Sun, 31 Jan 2021 18:06:15 +0000 Received: from AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM (2a01:111:e400:7e08::48) by AM5EUR03FT022.mail.protection.outlook.com (2a01:111:e400:7e08::79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11 via Frontend Transport; Sun, 31 Jan 2021 18:06:15 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:9C21C177A101A8DE19817EC4056BED663B019DFA11929A3BF987AD8512DF04A2; UpperCasedChecksum:CEF245BBCDF631C4083BE6E3CE30DF13E624E6A7D0CF7EFB23C65FCAE3EEC108; SizeAsReceived:7902; 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.3805.024; Sun, 31 Jan 2021 18:06:15 +0000 Subject: Re: [PATCH 4/4] Skip .cold functions in search_minsyms_for_name To: Andrew Burgess References: <20210131170356.GR265215@embecosm.com> From: Bernd Edlinger Message-ID: Date: Sun, 31 Jan 2021 19:06:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 In-Reply-To: <20210131170356.GR265215@embecosm.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TMN: [UCmF7LS9FFjiAyIm8jbW3EtuCW+byvgO] X-ClientProxiedBy: AM8P192CA0025.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:21b::30) To AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:364::23) X-Microsoft-Original-Message-ID: <5ccec199-6120-1f37-71c8-72d4ede9ce21@hotmail.de> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.101] (88.68.3.2) by AM8P192CA0025.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:21b::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16 via Frontend Transport; Sun, 31 Jan 2021 18:06:14 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 389e0e83-a700-4f48-9eb8-08d8c612e636 X-MS-TrafficTypeDiagnostic: AM5EUR03HT204: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 60NhBwC6YL52exco8DYnTghhMOFi4nX1gKKEJ0ByWpb5G2bgjc3ZkgX8inJfR4WJYl+9KoiUZmu071izzAkkQ/FBtcg0A5VYhFEn/CsPiJj47ehGOTzPkaI0dHaYtG0m7zUxyzVvISs4DSwH5kW3A89fWu9rojHKLpNyHjeB35v7OCc76XpcvFM5+5+zZPC8+HeKYvYa3ow6KfbaGdEYkoIbMXshxZhUu3Md79jhC9Kmb38a7PSd/uDwTAagUMq8xp9OApcp0J2/+2XgHViCnHlHTEpxfoasC5VSjyS34DkEnaPcYP820W7yoT3o6h4I7PWv6s8pBV+3CB3opgEWo7eTKYbv1im/f1dPlYWYcrbdrm47JRjiTsiBj3VyznsLB4d9MAHOJdi8x9qiTf8z2A== X-MS-Exchange-AntiSpam-MessageData: 9b+2T0MdhFv+m+l+Y5oA4gqStgPiSBY5pk/VVzRZ4Dl3R0ZTreHFfMS3kexuIJUCS7AHBba7js9rXcBoODvRIB5GNCaEde5kGlJFluGrpEMon8QmjvnFwcbI8brSDGg7piYjQNdUAsi6kKQ9Xx6WZQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 389e0e83-a700-4f48-9eb8-08d8c612e636 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2021 18:06:14.9583 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT022.eop-EUR03.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: AM5EUR03HT204 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: "gdb-patches@sourceware.org" Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 1/31/21 6:03 PM, Andrew Burgess wrote: > * Bernd Edlinger [2021-01-31 10:13:54 +0100]: > >> When a function with the same name is also available, >> that is preferred. >> >> The .cold function is not the external interface. >> >> Fixes 77f2120b200 ("Don't drop static function bp locations w/o >> debug info") > > I assume that this last sentence means that there's a bug / oversight > with this previous commit. > > You should explain what this issue with this commit is and how this > commit fixes it. For contrast, notice that the commit you reference > took ~200 lines to explain the change, while you've given us just 7. > A good commit message makes reviewing this a lot easier. > Thanks for your review. I'll add this to the commit message, hope it clarifies the patch: The motivation for this patch, is that I became aware that the "real" get_alias_set function (in gcc's cc1) had a two-PC breakpoint location with gdb-9 but a three-PC breakpoint location with gdb-10. The third breakpoint location was not an entry point but somewhere in the error handling, which is named "get_alias_set.cold". Bisection pointed to the above commit. Prior to this commit the static "get_alias_set.cold" was ignored, since there is also global get_alias_set function. Basically the previous behavior was ignore any static function, when there is a global function with the same name. The current behavior is to consider a static function and a global function with the same name as different entities. But a function named with ".cold" is not a real function at all. It is just a wrapper for all the cold code paths in that function. Therefore this patch checks if a function with the same name is found and skip the ".cold" overload in that case. Bernd.