From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20602.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::602]) by sourceware.org (Postfix) with ESMTPS id 6814C3858C39 for ; Tue, 4 Apr 2023 14:15:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6814C3858C39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WA4bA2x+RozYPMIhtELVeH63CgfHfz1WzJ6IcmlHvHM=; b=JAaXjO4eLsN57wIFePmi+isxhcFAyV2JUfwAmfDkmKHKCv5Gt2bT4wZ3otm/jQOHPffrV6BspaEi9iPsi3Xvl2guTeusUmc1YJcVMldCaAbhNxEGyUs1LLIQedWrArNMiupnwmUbM4RG0np/Po3mfJJhDjEAdnZqpazmTJqcZcs= Received: from DB8PR03CA0022.eurprd03.prod.outlook.com (2603:10a6:10:be::35) by GV2PR08MB9232.eurprd08.prod.outlook.com (2603:10a6:150:d9::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.33; Tue, 4 Apr 2023 14:15:45 +0000 Received: from DBAEUR03FT062.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:be:cafe::13) by DB8PR03CA0022.outlook.office365.com (2603:10a6:10:be::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.34 via Frontend Transport; Tue, 4 Apr 2023 14:15:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT062.mail.protection.outlook.com (100.127.142.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.22 via Frontend Transport; Tue, 4 Apr 2023 14:15:44 +0000 Received: ("Tessian outbound 3a01b65b5aad:v136"); Tue, 04 Apr 2023 14:15:44 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 9101da1c708b2328 X-CR-MTA-TID: 64aa7808 Received: from 2cb87ba99550.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8B692763-5E08-4CCE-9488-7A585E6C0CD4.1; Tue, 04 Apr 2023 14:15:37 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 2cb87ba99550.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 04 Apr 2023 14:15:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xcb7h9UNvluE707BNP+COzB2hJmujQ9rjfnXydcx0E1MJnzoZu+Wf+tAJAVEesFptxlXp0Au1GcmDEsCaxrvizrwv0kFqD4SkfNF6Yt2JWsNNVwwN7bHNyZI09LiwaaYyq7uTQhDpNWAtgUL6a/HSxIcCv6RJTPmTEKg3kixjvMUZhnoFY/2Q4xd7QLDe2p71uHFZ/3QxDwiTAVQ/PtzxI2GQMOnGosgQrBRKzlylG1X1JIPz2EBuFVQWlqGswHQETViQaut8+wwLaRxaUjq9Vc6atCJD4/CEEAqQj8zPfaSaNwD6V05AnfuO42wS4mfy36pLPYHHyR9myFTOZdBqQ== 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=WA4bA2x+RozYPMIhtELVeH63CgfHfz1WzJ6IcmlHvHM=; b=ZS4oCsJ4pXFENbwXdI/JEALu5FenSRRcdgTPX9ICoei0D9SmIwvSngrxhC0ZzSfeLaHOrw1lariOWhsMjF0u3jGCzoefKojAltQL6A3zniVylbyf5GLF+H50/ed+T1MKBro5lAjBE7XgqlhnmtdAjnddohwjQfQ7nfOWnCOQygWfsdfEnf7g+JFiVcFUaq3bkzZ/RXWkkaJhb/R/PVQXH8zO/PuN0zC3qB3ktrXVrtnURtgoQ4JV5Hp1Yj4ZqAA/3oqT++n1tM3e1BKEWlEK77JhtDYX5+Hnas66MJekHjpQ+VktsIu4kI6z/KhU8VvOHAM1W1SR0lx4hPsjqmj10w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WA4bA2x+RozYPMIhtELVeH63CgfHfz1WzJ6IcmlHvHM=; b=JAaXjO4eLsN57wIFePmi+isxhcFAyV2JUfwAmfDkmKHKCv5Gt2bT4wZ3otm/jQOHPffrV6BspaEi9iPsi3Xvl2guTeusUmc1YJcVMldCaAbhNxEGyUs1LLIQedWrArNMiupnwmUbM4RG0np/Po3mfJJhDjEAdnZqpazmTJqcZcs= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by DB3PR08MB8937.eurprd08.prod.outlook.com (2603:10a6:10:428::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.33; Tue, 4 Apr 2023 14:15:35 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::7386:6dd6:e6ba:dd94]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::7386:6dd6:e6ba:dd94%4]) with mapi id 15.20.6254.029; Tue, 4 Apr 2023 14:15:34 +0000 Message-ID: <0e73668b-9d7c-261e-327b-eadfe610c406@arm.com> Date: Tue, 4 Apr 2023 15:15:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [EXT] Re: Slow "symbol-file" when using GDB 12.1 on Windows hosts Content-Language: en-US To: Adrian Oltean , Eli Zaretskii , Pedro Alves Cc: "gdb@sourceware.org" References: <070fbd13-e03c-a4e8-1372-3f7813b7db92@arm.com> <83sfe3ciwy.fsf@gnu.org> <0df63795-2424-52e0-da93-92ab75a6d50f@arm.com> <83bkkn8sre.fsf@gnu.org> <838rfr8qym.fsf@gnu.org> <895b1df2-5559-d1ca-7369-3b9089cccbc4@arm.com> From: Luis Machado In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0102.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:c::18) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|DB3PR08MB8937:EE_|DBAEUR03FT062:EE_|GV2PR08MB9232:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e92ee3c-5e1f-4f68-136a-08db3517147e x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: zv4WQKEx9zm1ScrD+ap2RqYu+LObTXQEdck/y708VUyiQPgmFMAf2Lif+/9xVFL78NTWLSUk+paTJv6jnKHqE2Iech9XkD5vfZ+cbyfqyG/Cn2Y7Ecn7XecHrExevwP9kiAfXyXn5f2MPlowJ9OWASPDge/B+EWWdm+eRLomGxDbPJ2GfzXhvzl2RBUs+EJKAJfnaCC7CnM/4fq304vG8yyPYeG0pDXATHQbKz6YVK6yHBn/XTV8kfhr40p50vJHejWUBXT4aMw62hlkGskHjYzOy1RBWS3pnGE93cMOpDf1HJkYh4BEJao/bLzf1oriTztqQEKTZRXGa4pAZDsGYDSD5bh1Z9CEDjG7mBhAB76qvhrZ1Y9rPjSc8It2z23snAXDzB3DLW8997/seB4vueoCGhvobEUWR/8KIBZAuot9zrxpU5wvgc5ckYd8MEA6d1RzO0gfp+YwkF1V5UGLxILkoPxkDv7fddh1nEVTuNDKARL+YDv1bG5RMTsfBujo354Fq57Hth6JN3tKY5UGJrSPb5UmsSmfmQKqKIMzbSX0usut5N1MOs1Nv96P1LiOfpZ7R5uxdOeo6xDyNTtwgBAdHDMGpITbWdSqpw/5br7yDOTal8r9OfqTrbssszC3trgKYn9naWiVx88KhSP3Vg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB3919.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(366004)(396003)(376002)(39850400004)(346002)(451199021)(31686004)(186003)(26005)(6666004)(53546011)(2906002)(31696002)(86362001)(8936002)(5660300002)(44832011)(83380400001)(66476007)(66946007)(6512007)(316002)(110136005)(478600001)(6506007)(41300700001)(4326008)(2616005)(36756003)(38100700002)(8676002)(66556008)(6486002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR08MB8937 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT062.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 68c57003-a91e-44bc-7f98-08db35170e51 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KUDWNuHaSCxoAdRASNjAZ69TFuYD+MgNB2TTkSjf9mJhxIwIbaQxc6NM0OoOp0LgoORQxo5REKNBC974GTiNUrkMBtxG6AZOKg8ndKfRMjm8NdYofbry40ppEiGqYLxOdrT5wQH0VS4PXZpytPQTmdknad4vII6odKvhkc3TSFp7WC5KmJCtUBg2/6EKIOt8o6D9nAn3sqWm44VpZktcmR/MkXIOv+2owykRAV73JqcY5SwGE7jwQ2TqlhI1jqtOkmN10OGtJYZO4dm/rD/yzE/WAJ7/1IgOBQD7Li9w/oXV77rHs0vLpihNuCG1+mWdZ3J1KQrLob3JWMzNhSBJpSHKmqXCXIxWd7Px4uPw1ZuchmtQPf/dBVr4Mm6WKMuZX/kD88ehpKt3unWAmJ0UUJnnC4c2uJtCubvXjP18CeBpQziBk22UI+VDtDvEJmuC+hrAML88Evp0ErEUm0NvfQNG31BOKY8c5RpBFGYakY2Ke3usks+M6ghoOPgX5BMG5WeHv8Z891GbtLfx07nIy+rAvVrDmY0i2r7JuDR9orKYhjCBsX5keRFkKDqSKHpZd5EL8Lwre6DrWvlKmaAUrf4qKivnpq6M6hsjeu9u6lvVP7D7ZvF6POLZtmNII5Xc9Y17PRljgCJ2s34H1YIa0PdcNym4f7MZMu9mBJMdn5nFBwD5KIqAR1e1v8ywnxWFPm3fQSG5QWJ3vFIPaBapVs7DfS8vviOe7uzZZJPrdew= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(396003)(376002)(346002)(136003)(39860400002)(451199021)(46966006)(36840700001)(40470700004)(8936002)(41300700001)(478600001)(44832011)(4326008)(70586007)(70206006)(83380400001)(8676002)(110136005)(6666004)(31686004)(5660300002)(6486002)(316002)(2906002)(26005)(6512007)(53546011)(336012)(2616005)(6506007)(186003)(40460700003)(47076005)(82740400003)(36860700001)(81166007)(31696002)(40480700001)(82310400005)(86362001)(356005)(36756003)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2023 14:15:44.7383 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2e92ee3c-5e1f-4f68-136a-08db3517147e X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT062.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB9232 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,KAM_DMARC_NONE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NONE,TXREP,UNPARSEABLE_RELAY 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: On 4/4/23 15:07, Adrian Oltean wrote: >> -----Original Message----- >> From: Luis Machado >> Sent: Tuesday, April 4, 2023 4:02 PM >> To: Adrian Oltean ; Eli Zaretskii >> Cc: gdb@sourceware.org >> Subject: Re: [EXT] Re: Slow "symbol-file" when using GDB 12.1 on Windows >> hosts >> >> Caution: EXT Email >> >> On 4/3/23 17:48, Adrian Oltean wrote: >>>> -----Original Message----- >>>> From: Luis Machado >>>> Sent: Wednesday, March 22, 2023 4:31 PM >>>> To: Eli Zaretskii ; Adrian Oltean >>>> >>>> Cc: gdb@sourceware.org >>>> Subject: Re: [EXT] Re: Slow "symbol-file" when using GDB 12.1 on >>>> Windows hosts >>>> >>>> >>>> The logic to lookup debug info is OS-invariant I think, but gdb does >>>> have to adjust to the Windows-style paths. >>>> >>>> With that said, most of the attempts gdb does at accessing >>>> directories is an attempt to locate separate debug info files or >>>> simply to locate shared library symbol files. >>>> >>>> Since there is quite a bit of variation in terms of where an OS puts >>>> those files, gdb has to use heuristics to try to determine those >>>> directories, so it will try to access gdb-generated paths sometimes. >>>> >>>> It shouldn't slow things down though, as it is mostly a file open/close request. >>> >>> Hi guys, >>> >>> I managed to identify what's causing the described behavior. The CSC >>> folder is actually accessed indirectly because of the fact that a >>> network share is attempted to be accessed by GDB on Windows - see paths >> like " \\lib\debug" in my previous emails. >>> >>> The fact that GDB is trying to access (most likely invalid in almost >>> all setups) network shares like " \\lib\debug" on Windows hosts, I'm >>> pretty sure the slowdown isn't happening only for me (actually, all >>> PCs from our organization). Note that this path is the one specific to latest >> GDB 12 build delivered by ARM: >>> (gdb) show debug-file-directory >>> The directory where separate debug symbols are searched for is "\\lib\debug". >>> >>> For GDB 10 I see: >>> (gdb) show debug-file-directory >>> The directory where separate debug symbols are searched for is >> "c:\mnt\workspace\workspace\gcc-10-pipeline\jenkins-gcc-10-pipeline- >> 338_20211018_1634516203\install-mingw\lib\debug". >>> >>> As far as I can tell, ARM changed something in their build environment >>> causing this unwanted effect. With this findings, I decided to >>> workaround the problem by setting debug-file-directory to an empty value >> once GDB starts-up. >> >> The default debug-file-directory gets set during configure/build. I don't think the >> previous path is correct, as it is obviously a path internal to the build machine. >> >> GDB has relocatable paths that it adjusts based on where GDB is running on the >> target system. Those settings will be shown by the command Pedro suggested. >> >> For instance, one of the entries: >> >> --with-separate-debug-dir=/usr/lib/debug (relocatable) >> >> With that said, \\lib\debug seems a a bit odd, and there might be something off >> there unless your filesystem is NFS-mounted. >> >>> >>> Thanks, >>> Adrian >>> >>> >>> > > GDB 12: > (gdb) show version > GNU gdb (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.1.90.20221210-git > (gdb) show configuration > This GDB was configured as follows: > configure --host=i686-w64-mingw32 --target=arm-none-eabi > --with-auto-load-dir=$debugdir:$datadir/auto-load > --with-auto-load-safe-path=$debugdir:$datadir/auto-load > --with-expat > --with-gdb-datadir=//share/gdb (relocatable) > --with-jit-reader-dir=//lib/gdb (relocatable) > --without-libunwind-ia64 > --without-lzma > --without-babeltrace > --without-intel-pt > --with-mpfr > --without-xxhash > --without-python > --without-python-libdir > --without-debuginfod > --without-guile > --disable-source-highlight > --with-separate-debug-dir=//lib/debug (relocatable) > > GDB 10: > (gdb) show version > GNU gdb (GNU Arm Embedded Toolchain 10.3-2021.10) 10.2.90.20210621-git > (gdb) show configuration > This GDB was configured as follows: > configure --host=i686-w64-mingw32 --target=arm-none-eabi > --with-auto-load-dir=$debugdir:$datadir/auto-load > --with-auto-load-safe-path=$debugdir:$datadir/auto-load > --with-expat > --with-gdb-datadir=/mnt/workspace/workspace/GCC-10-pipeline/jenkins-GCC-10-pipeline-338_20211018_1634516203/install-mingw/arm-none-eabi/share/gdb (relocatable) > --with-jit-reader-dir=/mnt/workspace/workspace/GCC-10-pipeline/jenkins-GCC-10-pipeline-338_20211018_1634516203/install-mingw/lib/gdb (relocatable) > --without-libunwind-ia64 > --without-lzma > --without-babeltrace > --without-intel-pt > --without-mpfr > --without-xxhash > --without-python > --without-python-libdir > --without-debuginfod > --without-guile > --disable-source-highlight > --with-separate-debug-dir=/mnt/workspace/workspace/GCC-10-pipeline/jenkins-GCC-10-pipeline-338_20211018_1634516203/install-mingw/lib/debug (relocatable) > --with-system-gdbinit=/mnt/workspace/workspace/GCC-10-pipeline/jenkins-GCC-10-pipeline-338_20211018_1634516203/install-mingw/i686-w64-mingw32/arm-none-eabi/lib/gdbinit (relocatable) > >> With that said, \\lib\debug seems a a bit odd, and there might be something off >> there unless your filesystem is NFS-mounted. Thanks for the information above. That's very useful. > > Is the described behavior specific to the Windows image I have? Maybe... I don't know... > But it's a fact that the default 'debug-file-directory' that's configured in GDB 12 introduces some > unwanted side effects for me. If I 'set debug-file-directory' before issuing a 'symbol-file', > everything's fine. I'm assuming, given the network-like path, the Windows-hosted version of gdb will cause such issues when gdb does looking for the symbols. Let me try to gather some information on how gdb was built for these toolchains. > > Adrian