From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR06-AM7-obe.outbound.protection.outlook.com (mail-am7eur06olkn2064.outbound.protection.outlook.com [40.92.16.64]) by sourceware.org (Postfix) with ESMTPS id 31581388A42B for ; Sun, 23 May 2021 11:57:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 31581388A42B 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=Jf55jKGngYQT4P7Ha2y9/+gQfMBlq30p5SIVEf+dtV9EWuWaNMOTQm8Kart41+VlarUcT+0XVLabbdYA1oZTSDfhpIiGkGpelPxEslTGFPTHAIHyLSlMzxi1Z8EjmJuBQf60l6CT0vcVpD3SGEFPuY0LccrZjavdEg3C6nOV3H1BKC12AchBQ8bEodP0A6La7UFYd3fvxZkpHsH/3CLA0klZzG/1/DFUxv7bE0xm2kTw8eHYfTRRNJSK4IOrM7PnuP/oHG7rfe3V35iLFIpammLBPUvqWR4q0hLRJYVOOGkChD2vUTB28iMa01efVw6O2yGbW1JmVsxyhiCFkqTm9w== 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=6vlzRvWGt68Kp3ipP9TDAxFsOJKaeZB2Aiz4hqyBttA=; b=EXsWjqLE8vFq7b7k58a4tYjaKhj9fbh5Vscr6CyEmqa3hhojU3Xz0Ukm9SuEGfaJW9j4kOPpzA6qaqPjSLR+Tt+bcIBZN5zXUAunHst1uTTPfWf86K6htl5yyLLdapzxBesQnu5n/TqsTxIoyievI/Vyac2FnDJBq2GFMFlcTojBWO93z8W/GSq6Ejk5B85wjC4mxfXc3xmQRik/fxq8CCdV8CawkgLLkmj6bs+V4JLYPsmOuOBr8nPWbEiLHccnYaW4wIDhuoxyX3h9oGMo8RERQiCcwCWxk+YI9ghTaO+LLqJHC9m2LqKTA9layY7mFd+d9tbSiiDPCetsbGNwhg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AM7EUR06FT057.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::4c) by AM7EUR06HT215.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::266) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Sun, 23 May 2021 11:57:03 +0000 Received: from AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM (2a01:111:e400:fc36::50) by AM7EUR06FT057.mail.protection.outlook.com (2a01:111:e400:fc36::445) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Sun, 23 May 2021 11:57:03 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:0B13003D088A2F18F65DA23D62C4AC8E3688AF47CF43BFE3CD51F85375443233; UpperCasedChecksum:59C217C62C09EA0623012235992CC99DB74E3C85BAA17A5F473835B68885372B; SizeAsReceived:9001; Count:47 Received: from AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM ([fe80::ad12:6a2c:b949:f65d]) by AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM ([fe80::ad12:6a2c:b949:f65d%4]) with mapi id 15.20.4150.027; Sun, 23 May 2021 11:57:03 +0000 Subject: Re: [PING**3] [PATCH 0/4] Improve debugging of optimized code To: "Willgerodt, Felix" , "gdb-patches@sourceware.org" References: From: Bernd Edlinger Message-ID: Date: Sun, 23 May 2021 13:57:00 +0200 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=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TMN: [7B3m+hL10HFRWj3E1rPzTwwRSXOZHWTL] X-ClientProxiedBy: PR0P264CA0223.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::19) To AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:364::23) X-Microsoft-Original-Message-ID: <6103f37e-873f-8212-f267-6787c605e543@hotmail.de> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.101] (84.57.61.94) by PR0P264CA0223.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Sun, 23 May 2021 11:57:02 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 1bd92bf6-5a29-45bb-b9b9-08d91de1e156 X-MS-TrafficTypeDiagnostic: AM7EUR06HT215: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4/3P7yDZTigTJLWL33WmaRk1Jbo0+0vvDzm48F8vaVJch3HLqdPYEZ+yhs+rz9Qjq6uZzuNb6/R0FJ/nH0TW45U/3L7UY/kZ/nNYCEXgL5SkHExqPwc36RnZCYOR5lyYMJ4EhdanpVLTT8CR7o3ki0S0JMjKbgpv64SxcJhlM+n6aPCqYVZ7QJHK/2Qve30iv9anMKJbgTOCIxhdnp0yYlM+QeN0BpbS7KCVOyRGe31C1xbzedou3r018GZmjqRlkV2RkVuBL2Ow70kOZfp6FGhzPvvnVN4PSCTsVUy+CrR21vKNlbpY2dW5h3sZqkTz3oZLmM7zauunewTtDmXdYWbqugE6RrzGC1JP1xof6fhYA+mHRNYOxxoPZP2qlM2JWcURauRBWmV1iRSDBwzsUA== X-MS-Exchange-AntiSpam-MessageData: Pt80zAjgYXtwWHV//hflR8AfMR6j7iyFMVv7m3E+joIKw1uukucB9CYXk+kuLg6yQWpxzqgroF+8P6Fy9iUmvmT+WQ69vFcb3vW1Osuat1yP9rDjj3de3kRearSId+St4XnOEjbKS1NmimWbXPB4mA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1bd92bf6-5a29-45bb-b9b9-08d91de1e156 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2021 11:57:03.8564 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT057.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: AM7EUR06HT215 X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, FORGED_MUA_MOZILLA, FREEMAIL_FROM, KAM_DMARC_STATUS, MSGID_FROM_MTA_HEADER, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Sun, 23 May 2021 11:57:09 -0000 Hi, On 5/21/21 2:42 PM, Willgerodt, Felix wrote: > Hi Bernd, > > Thanks for this series. I think some of the improvements are very valuable. > > I noticed that the empty-inline.exp tests show one failure with clang. > I am using: > > $ clang -v > clang version 10.0.0-4ubuntu1 > Target: x86_64-pc-linux-gnu > > I think we should do something about this. I haven't looked at the cause really though. > It might be that we need a bug ticket with clang and/or just limit the tests more for now. > > Thanks, > Felix > > Thanks for looking into this. I think clang does never emit breakpoints at the end of an inline block, therefore in all test cases I see never a weak line in the "maint into line" output. I see a minor issue with the line numbers, in the empty-inline.c. (gdb) b main Breakpoint 1 at 0x401121: file empty-inline.c, line 40. (gdb) r Starting program: /home/ed/gnu/binutils-gdb/gdb/testsuite/gdb.base/a.out Breakpoint 1, main () at empty-inline.c:40 40 test1 (test0 ()); /* line 40 */ (gdb) s test0 () at empty-inline.c:40 (**) 40 test1 (test0 ()); /* line 40 */ (gdb) s test1 (x=1) at empty-inline.c:31 31 return x+1; /* line 31 */ (gdb) s main () at empty-inline.c:41 41 return 0; (gdb) ** = this line is not there without my patch, is shows the right call stack "test0" but unfortunately the wrong line number, the test fails because it expects line 21 here. CU: empty-inline.c: File name Line number Starting address View Stmt empty-inline.c 29 0x401110 x empty-inline.c 30 0x401110 1 x empty-inline.c 31 0x401110 2 x empty-inline.c 31 0x401113 empty-inline.c 39 0x401120 x empty-inline.c 20 0x401121 x empty-inline.c 40 0x401121 1 x empty-inline.c 41 0x40112b x empty-inline.c 41 0x40112f x so there is no line 21, only line 20, but since it is followed by the is_stmt line 40, at the same address, this line is displayed instead. I think this looks bogus, since if the asm statement in line 20 would contain some real instructions, the effect of break at line 40 would stop after test0 executed but before test1, so in the middle of line 40. Of course this test case is a bit artificial and normally clang sems to avoid constructs like empty inline functions, or breakpoint locations at the end of an inline range. Thanks, Bernd.