From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0605.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe02::605]) by sourceware.org (Postfix) with ESMTPS id 67E7A3858D39 for ; Wed, 15 Mar 2023 15:50:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 67E7A3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d23Wapf7DNsh//lnAOlGSaXp1Zi+JqNjRT0ZdpPnpnmoeVVdGcAeEDkxj8fPDcB4x3lt10YcBC/1C7C9A7dmEvz9bVxOfpPaSFcpz5S8tZ/iPrgqngeaadMsgH/VTHS4+Q6IWu8DzroZ6lfLe0GWdRjKccDPN3UXRbLELPq7vMTw1vA5f/QxrLliZRhnCkDGW1dx1RzB85cGR/CZDfrPFvTrBWsjxcfGVwnoQr9PW0RNkxDXgl1GSnLMIEbwR5NyA2DRt9HN+uh0b1ZuCxIPiVFnMFuiAe4LwyT1oyTZCmSZwV2912tLiNV/RA6kM74py9MXxu0yTkBU0TYGshX/eA== 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=omdoIYm2pCJiul+FwugFREJnY4ALFcHzNmqH/eLrptc=; b=LfHetYW99qWVia63CB79gnxxxVggEzJGbfGBOFAc3rPpIKr+2U+9F2lMK8UOe44r3aiplrubGGBI8weKUxxPGAZmjEode8MZAvZMhNjjbfIkIz3pXxvKDdKxDG7deotmry7JcxrDyRiWPA9ZOFKUgYM87vaJDVEHRUZHeFlTLisER8Wm9Xlft1FOHIah5Sg6BvZ9NmilnD5ThxW/dpCFkKcwBBmKRL7plinzVNbDf39Cmp0KqbSHUGdZs54NfZGgu9eaDZpiwlByk/x2B65Mh9VOoC0uvIYqPZ+Yy6az0xDu9qFtcPobqOxmX8VjCFRHraS8cW9fbskQ7a/ie2VNIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=omdoIYm2pCJiul+FwugFREJnY4ALFcHzNmqH/eLrptc=; b=K34ASlL7aZFn2pSv6VGM4feJuf9Yr5+pbLAj6GOpSolfPkqoBVHzlVVhLlneKpxh12v/0CU+awfqb2gJrNaKqUsvKRvxb2cTIfFD8hbL9LegBKwE9h35lsh6xg6a1To4Bk7gJSqF4qG9Q5pjjNs6n6RRSkGJG3ytqapCeHIWLqI= Received: from AM6PR04MB4630.eurprd04.prod.outlook.com (2603:10a6:20b:17::21) by AS8PR04MB8563.eurprd04.prod.outlook.com (2603:10a6:20b:422::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.26; Wed, 15 Mar 2023 15:50:45 +0000 Received: from AM6PR04MB4630.eurprd04.prod.outlook.com ([fe80::727e:eb1:4ede:272c]) by AM6PR04MB4630.eurprd04.prod.outlook.com ([fe80::727e:eb1:4ede:272c%5]) with mapi id 15.20.6178.026; Wed, 15 Mar 2023 15:50:45 +0000 From: Adrian Oltean To: Adrian Oltean via Gdb Subject: Slow "symbol-file" when using GDB 12.1 on Windows hosts Thread-Topic: Slow "symbol-file" when using GDB 12.1 on Windows hosts Thread-Index: AdlXVVNmRib6SHbkRUyqh8132X9UKQ== Date: Wed, 15 Mar 2023 15:50:44 +0000 Message-ID: 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=nxp.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM6PR04MB4630:EE_|AS8PR04MB8563:EE_ x-ms-office365-filtering-correlation-id: 98f06186-f9b1-4abb-14d9-08db256d09c9 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9hWMe0pl+DNb+QjMNP3tDUaFiqceGJh6TUwFSS5WBC/GapAAAi0N3KXL9GEFMw3k7t4cZnyCV1baAXF5L4mOcvPFcYr8ROiIl71DGy63xv8S9qHj9gwKeSrmyyDQXIp2/+d7D4MoGx6kMfTkzQawkK1wQBUfXbDPKtju3YOGUSNpsNN7JhUdYnFNqZUHNmnDiuHoM8luq1YW3y6Gg7d3aOc/Px7+ZEOuL0tiAJ7dwSGbK32omFy5asCRK9SKXxZYeujbauoREHyFcQW+I4JGYnh6UGPV06/pcXa6ad+XUXXhT/nrHjgGgWHjS0+4LPcDWdxin7nZvU5jxRwj76j+qeIxqsevmZMVOU5GS0yJTNO311BQkDK0TnimbmLWTphHaDx7S8MJc5t7mM7e+yfRtRFH8LoGGlT2/aTSCEixfZCcgVgKEd09N7zSjUgkDPjBlw+3V89PycEpqU3c2EcOX37C2caHHEJZ41Bx9MMkfFYkm9nD0uvZRGRmzhbHc9XvBT4kgA0SwOkq81XZr5x0w4z7c+Zlasl9wMjJoGd/FGNM7W75UOtj8QzKO+JzCRGVzpHuym8b+kIXn5rZGcB9/Et9R0YzZB2Zq1kSMuL+SeRBORAllDi9Vq9L4spAGcxWD8Xt/s248Qgb5gVqjX/UjU6adn+4gvu+8n939R66c00ZT8qbA4M2UtnIOydM0sO5nIbGqLbtD9uipf087IKgSVsJfsUzWW8MvuljNtpMRxU= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB4630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(346002)(376002)(39860400002)(396003)(366004)(136003)(451199018)(41300700001)(6916009)(316002)(8676002)(33656002)(55016003)(6506007)(9686003)(186003)(64756008)(66476007)(66556008)(66446008)(66946007)(76116006)(52536014)(9326002)(8936002)(44832011)(5660300002)(478600001)(2906002)(7696005)(71200400001)(26005)(86362001)(83380400001)(38070700005)(38100700002)(122000001)(460985005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?rtT8Y3jZRG7ObsdL5Akae0op5M2qzb2AUgyFS5wf5dAiOWmu2DwWGb1bx+lp?= =?us-ascii?Q?nQP5rWpgX3J+hQ0b0x7YryCxBOMvcwpfnvkZH6d/AAaV5XdauOLK8TEX2TNw?= =?us-ascii?Q?s2Ks4rPiqfP82v1Cn+l7RXMGJNTuoati/nnOQwigOhjP1IEUR3rk8YtGuyjM?= =?us-ascii?Q?Oh9oBRW5zWx1ZjruHJ34tGOg6XeR5qawZKcMniYPV25WwPHDInyvp82mMvYi?= =?us-ascii?Q?AvjfSc8RaNMy+i18LUX0UKbVV4XKXEGI7bGXw1CT23fgXRL3y8RM4EpceUHb?= =?us-ascii?Q?P8OWvgX3BxMFTnUBN/wYwGJ8W/sdoroszK18Bo/35PFkfJrF4fXdkwvRrRS/?= =?us-ascii?Q?xTnvC50nHceeHw6IH+pSiiBe+J2yXZfLCoPTotCHKGbrPuq8jKVE12d+D0dl?= =?us-ascii?Q?C1SQ8I9HfplPZMp6v1G+6YrJeDVDmY+/TluBUFinCLNUJvRhvkszNn5yMwdl?= =?us-ascii?Q?An9jlfVO3k3gOMkwiFZoGQ5WgnIq2Sbd7OWTBSYqQEe4L1eb3pIyR4aOJWSp?= =?us-ascii?Q?ZNvgTJW9fOTdJOh1eoCWJtLUPpooZUW/P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?3AuVi7tk8AlVLJznalOLUJOGCgS67IkZ1lbs1m6co+1n1uEswOM6a7Kd2CJI?= =?us-ascii?Q?OM7nyq91QszkpApmxSN+ABD/hVXNdLZPWLe0GkqjRjj4BPsgse8xFmbgVpkC?= =?us-ascii?Q?szv7P0v6p430I7nhlX12FD4rmQN+lAJ4xBkBTMYB?= Content-Type: multipart/alternative; boundary="_000_AM6PR04MB46307C87F98BDF760FD077FBF1BF9AM6PR04MB4630eurp_" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98f06186-f9b1-4abb-14d9-08db256d09c9 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Mar 2023 15:50:44.8268 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: A+G0uKFtKhzFYIuiQ9rilMFqPhAbBvmhPFOO2e6so/DuOIEr3KLSktm2WcKFwZCp4vyzKYeK4Qw1h38/MtV9NQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8563 X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_05,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,HTML_MESSAGE,SPF_HELO_PASS,TXREP,T_SPF_PERMERROR 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: --_000_AM6PR04MB46307C87F98BDF760FD077FBF1BF9AM6PR04MB4630eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, We recently upgraded the GDB version (from 10.3 to 12.1) in one of our IDEs= and found a painful performance issue on some Windows-based machines. I used Process Monitor to identify the events that occur during a "symbol-file" in= vocation. This is the command that now (GDB 12.1) seems to take ~2 seconds in the most favorable case, and ~20 seconds in the worst case (on some machines). Note = that this happens with basic/small ELF files. Moreover, in GDB 10.3 execution of "symbol-file" is almost instant. The relevant list of events reported by Process Monitor is the following: Time of Day,Process Name,PID,Operation,Path,Result,Detail 43:02.7, arm-none-eabi-gdb.exe, 13604, ReadFile, C:\MyIDE\workspace\MyProje= ct\Debug\MyProject.axf, SUCCESS, "Offset: 272,405, Length: 512" 43:02.7, arm-none-eabi-gdb.exe, 13604, CreateFile, C:\MyIDE\workspace\MyPro= ject\Debug , SUCCESS, "Desired Access: Read Data/List Directory, Synchroniz= e, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attribu= tes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: = Opened" 43:02.7, arm-none-eabi-gdb.exe, 13604, QueryDirectory,C:\MyIDE\workspace\My= Project\Debug\MyProject.axf.dwp, NO SUCH FILE, "FileInformationClass: FileB= othDirectoryInformation, Filter: MyProject.axf.dwp" 43:02.7, arm-none-eabi-gdb.exe, 13604, CloseFile, C:\MyIDE\workspace\MyProj= ect\Debug,SUCCESS, 43:02.7, arm-none-eabi-gdb.exe, 13604, CreateFile, C:\MyIDE\workspace\MyPro= ject\Debug\Users\MyUsername\Documents\MyIDE\workspace\MyProject\Debug\, PAT= H NOT FOUND, "Desired Access: Read Data/List Directory, Synchronize, Dispos= ition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a,= ShareMode: Read, Write, Delete, AllocationSize: n/a" 43:02.7, arm-none-eabi-gdb.exe, 13604, CreateFile, C:\Users\MyUsername\User= s\MyUsername\Documents\MyIDE\workspace\MyProject\Debug\, PATH NOT FOUND, "D= esired Access: Read Data/List Directory, Synchronize, Disposition: Open, Op= tions: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Rea= d, Write, Delete, AllocationSize: n/a" 43:05.9, arm-none-eabi-gdb.exe, 13604, CreateFile, C:\Windows\CSC\v2.0.6\na= mespace\lib, NAME NOT FOUND, "Desired Access: Read EA, Write EA, Read Attri= butes, Write Attributes, Delete, Read Control, Synchronize, Disposition: Op= en, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Wr= ite, Delete, AllocationSize: n/a" 43:05.9, arm-none-eabi-gdb.exe, 13604, CreateFile, \\lib\debug\Users\MyUser= name\Documents\MyIDE\workspace\MyProject\Debug\,BAD NETWORK PATH, "D= esired Access: Read Data/List Directory, Synchronize, Disposition: Open, Op= tions: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Rea= d, Write, Delete, AllocationSize: n/a" 43:05.9, arm-none-eabi-gdb.exe, 13604, CreateFile, C:\Windows\CSC\v2.0.6\na= mespace\lib, NAME NOT FOUND, "Desired Access: Read EA, Write EA, Read Attri= butes, Write Attributes, Delete, Read Control, Synchronize, Disposition: Op= en, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Wr= ite, Delete, AllocationSize: n/a" 43:05.9, arm-none-eabi-gdb.exe, 13604, CreateFile, C:\MyIDE\workspace\MyPro= ject\Debug, SUCCESS, "Desired Access: Read Data/List Directory, Synchronize= , Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attribut= es: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: O= pened" 43:05.9, arm-none-eabi-gdb.exe, 13604, QueryDirectory, C:\MyIDE\workspace\M= yProject\Debug\MyProject.axf.dwp, NO SUCH FILE, "FileInformationClass: File= BothDirectoryInformation, Filter: MyProject.axf.dwp" I see attempts to read files/folders that aren't actually present on my mac= hine. Also, a folder like "C:\Windows\CSC" (see "C:\Windows\CSC\v2.0.6\namespace\lib" a= bove) isn't accessible on my machine without admin privileges (I don't have this, accor= ding to company policy). I observe that an attempt to access such a file/folder (or= a network-specific path) hangs GDB for a few seconds. Questions: 1. Is GDB trying to find debug symbols in all those folders? Or what's w= ith them? 2. What is the code from GDB that artificially builds all those paths? 3. GDB 10.2 does not seem to access "C:\Windows\CSC\v2.0.6\namespace\lib= ", nor "\\lib\debug\Users\MyUsername\...". = Is this related to a recent change? Can someone point to the relevant change in this case? 1. Is there a command to stop GDB from attempting to access those files/= folders? Thank you, Adrian --_000_AM6PR04MB46307C87F98BDF760FD077FBF1BF9AM6PR04MB4630eurp_--