From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sTVsMAqkHGn+ChAAWB0awg (envelope-from ) for ; Tue, 18 Nov 2025 11:51:22 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=efficios.com header.i=@efficios.com header.a=rsa-sha256 header.s=selector1 header.b=FQYI1t1S; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C0EEB1E0B6; Tue, 18 Nov 2025 11:51:22 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 3478D1E048 for ; Tue, 18 Nov 2025 11:51:22 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CAD493857015 for ; Tue, 18 Nov 2025 16:51:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CAD493857015 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=efficios.com header.i=@efficios.com header.a=rsa-sha256 header.s=selector1 header.b=FQYI1t1S Received: from YQZPR01CU011.outbound.protection.outlook.com (mail-canadaeastazon11020130.outbound.protection.outlook.com [52.101.191.130]) by sourceware.org (Postfix) with ESMTPS id 287D83858C98 for ; Tue, 18 Nov 2025 16:50:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 287D83858C98 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 287D83858C98 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=52.101.191.130 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1763484638; cv=pass; b=thfAGs+2UAagMeAVRIFu208+9xdOlV66QbRT4AdlZbthGY/Lr26yoCHOhcTTMnAdFgKQzTyDMgUEWLQn7Of+Mpw5H8O7WqIz/mGKuYoi3J+LIG/ZdpnXW+Rk6ySXiDdHwLxuuMJmgwgzt2odnTlcyrNcbXenOMKpwV/mbx71HHw= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1763484638; c=relaxed/simple; bh=kpW+NSi9T1/bORIRQdmP3F459vQBOpz8OAEIIY7GYnQ=; h=DKIM-Signature:Message-ID:Date:Subject:To:From:MIME-Version; b=U0qbYRr4L3pusD7W9cMULHhhdsqL7VTKzrNR699FVF3Z6cuT0sRbDSERQJqU/BadAiBZb6T9ghaz4AovNpMhMeuN/qrXmeozBB/919P8BFF65b7rL5Fr29/doJtb119034zDvOtY5CRrb4gSlbzaerOISe4B2s8Inr2hdE2ggqM= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 287D83858C98 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NPauFLFrCxHuVFKbc66QjZhcgLCcINhFOqHaF1fgN2r/kB6Pvk2on5Zgc+vQ63C7oNbmszIc1cqGEUOwmsVHbKkRr0hiDfheokaehUx8vFXbd7odBdbK9Y+fhZvRhds76SgPAdMYHF0mjo4DtvQysVnVdyU2zCBWcP05c7e5GJzUhuC84S6/aleX9CGwAH9kP02YfCbhdvXM/cxPWdsCZ6ovUq8m0hM6J1GR1b7AAjTYCdDGxfL11Mm9hEpJuyouCan/NQeDnHQxBVAd5kk0muXBa29dPCF+T4primxjX7LnoVsxd8BRxhcsExhz68q4eIaZAoL9Wg2Ycygg+49vzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=IJhDKAdj4owEEz+TYsGHBO9MUMeaQiSocDGQfNu1ob4=; b=dh0OVpPEeUYbS9Mr4nBSd3OADMvgDhBbkT3zM8yqC7yAWdFxatVJM61OzfZltt3noDVcwURu7tUYuVFja61mCHbdmE+2KfPJUwHbiK1Lu9XCdFNFxVrXOG9vKXd+nAUt8gjRd+o1cc6W9n4x7tiEwLaNgslRSiHuTxCDRqjM7ZtqQmzng3k6zYuKTEUn23A4rWcBlkdP2pnd0Am3GTOC/Nvp0rmdLdXiK5z9LP/349A7p7BpRqbxd0ep8cC3qC/hAIz8dJWr2XMJpAXCJjSyPs319GeWvZrfh+LiYCxmtgk+tc/E9Ms+/zeO70/iSatWiOzLM/LU78y6UcXXicJmqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=efficios.com; dmarc=pass action=none header.from=efficios.com; dkim=pass header.d=efficios.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IJhDKAdj4owEEz+TYsGHBO9MUMeaQiSocDGQfNu1ob4=; b=FQYI1t1SFyZQVzB1IodB4JuaZTqRLhzd3RnQh3qOAWNRaIhzf2MGWyAX5s40bKUoGLD5aPlPU0qf54WeKTG+QWOVEbbLctfcINMH+fgWjtWpGrk0XvQ+Sm8c3BrqgccDshySFkUAJ9xMJ4w3ttKVgMmGNd30fHrqNPmpaZ5qp07VUOAp8n4IvLPERCNvHhC8sQ/Rda9Mx+XFiONe+kwimvGEcYM8PQ+rnPdvaYArmOOM4L2o6nOtsRR33ukhLkt6LiitvNJ/XC3D76hVIN7lhI5ZF1z4BEYLR9N3EVXRSJTXTSiYY5/Y4Sjae26XjuhoOSFxlIzT9r75tjafgQ8iKA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=efficios.com; Received: from YQXPR01MB5418.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:2c::6) by YQBPR0101MB6604.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:4b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9320.23; Tue, 18 Nov 2025 16:50:34 +0000 Received: from YQXPR01MB5418.CANPRD01.PROD.OUTLOOK.COM ([fe80::bbfa:179f:fdc8:b15d]) by YQXPR01MB5418.CANPRD01.PROD.OUTLOOK.COM ([fe80::bbfa:179f:fdc8:b15d%5]) with mapi id 15.20.9343.009; Tue, 18 Nov 2025 16:50:33 +0000 Message-ID: <504dca70-949d-47c1-803f-09e1197f04a4@efficios.com> Date: Tue, 18 Nov 2025 11:50:04 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/6] gdb/testsuite/dwarf: use single abbrev table in .dwo files To: Andrew Burgess , Simon Marchi , gdb-patches@sourceware.org References: <20251107211041.520697-1-simon.marchi@efficios.com> <20251107211041.520697-2-simon.marchi@efficios.com> <878qg3v54b.fsf@redhat.com> Content-Language: fr From: Simon Marchi In-Reply-To: <878qg3v54b.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: YT1PR01CA0090.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2d::29) To YQXPR01MB5418.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:2c::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: YQXPR01MB5418:EE_|YQBPR0101MB6604:EE_ X-MS-Office365-Filtering-Correlation-Id: a689e0d0-f22f-432a-e7bf-08de26c2970d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?NGhhTGRhTHhOZ2xSQ0J6b21LNjlTMUp4RUtJWnpSRkRGdXE5eDRFYllJalJ2?= =?utf-8?B?OUgvQ0RjSlNvMGpaZTR0eWNCR0oxYTJGNytvOTlJZDdibnlUSEZaUW1URDEr?= =?utf-8?B?aEpIa1dxNlFaemlYRzllSGlJYXhnSVhBMllTQklNSFFnUmRJTXFheUxwOGhT?= =?utf-8?B?dGhRcXhwaXB4MHNTWHBmTDlWU3I5ZFpON29TZ24xR1JqcGUwTkgwWlhLL0w1?= =?utf-8?B?L0o5UEZOOC9sN0R5b0U2L25OMXo5ditWbEsrTzh2WGVNaHp5cUZrRHNFRUhr?= =?utf-8?B?bUwyTU8ybUYyaFEzMEF5VHhlTnpyV3dqZ1ZDV3dkRWxsOHhRZlZZTnY1RGZU?= =?utf-8?B?dGQ1WnJIbkI3WWU2VEZ1aFVBSHZ1a1NuSXV5NE9Dd0JPRGdRUjUvV0x5RFp4?= =?utf-8?B?MVZDZzNyUHdtQTE2UU1QOG4wZ05SUXR1ckxyREdrU0drS1hUV1RwV1R0SzVJ?= =?utf-8?B?WGhNOTZ2VXIvY3pMUk56czQrRFZ3cXFJbkxVT1lkOTNDTjB5U211cFVCQVlL?= =?utf-8?B?Z0E5V2Rrc0hpVlNhcXp1dGNTNnJKTUpBbGVBRWI1S0wvMHRhcmRqSy9qVFpJ?= =?utf-8?B?WUN4SzVleGd5UkRhS2drclk2bFhoc2ZVbER5ZEIwb1AxQW9kZTN2b0g2UThh?= =?utf-8?B?TkpP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NNE1XdVVHWGhh?= =?utf-8?B?eENMRjVEQkRCQ1JYcTJ1REFUblk1TjA0bkJHUXpPZUtiUmxWN24yTmxtOTVT?= =?utf-8?B?Z29uY2x3MkhCc08zVURmZjdjczJJYk5aSy8wVU5zbTVVYkFuV2tmL0s1ZEZh?= =?utf-8?B?NHNpZGFETVF1MWkwdVFXc3ZwN2JaVERuR3dQU0did0lIdEtvdDdFMTlLT2Mz?= =?utf-8?B?Ky91TGZheGxLcGF0RGc1ZUdFS0NiaUwyTUlIQlVLZE5OZFViSU4waDQwUW0x?= =?utf-8?B?NDFsNXhqdGtMdXVlbmNFU1drZjdFZjVoNFFqdGFMZm9vN0p3SWsrUUl2cGFF?= =?utf-8?B?YWV4Yy9kQnh3K3NhSjV4T2NXZEV2NU53ajZlbUFMTTBCUWdKYjNFcHI0bVV0?= =?utf-8?Q?/iOKWu5KYDJ1Lb1AMUrpkOU6uHFToAb9?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YQXPR01MB5418.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NlJFNEJva1lMZmNLdmY3eGxWdWpZWUd6aVZkdmFYNjFxaU1nNzBHTWNveko1?= =?utf-8?B?VXNnN3YxYThiVlppc28rNTZBSlN2SzcxZjhIMG0wcnhTVkxtR050dVBoUmdj?= =?utf-8?B?dm5FUjR4ODNlSy9TSk93MnpxdGRueFRIMXlieWxwWHF2TEwvRzVXZVA2MTdx?= =?utf-8?B?dE5wOWFabUZ1d3VrSDFuK2hjMklBbHdrZ3gzY1ZVQkdmRmdYZG1OOWZPd0tC?= =?utf-8?B?ZjJraVE5NjQyMmRkZFB3ZU9hWXFCSE40QnorVEJLT0dyQ1JUbkVIQStS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daL1dtNXNOSkJIZmFtS1I5QlMvZm1PL3JVMkxvS3lmSFo1NlA5?= =?utf-8?Q?lz+PPIAFeGTimz2kfYqa0v+1Z?= X-OriginatorOrg: efficios.com X-MS-Exchange-CrossTenant-Network-Message-Id: a689e0d0-f22f-432a-e7bf-08de26c2970d X-MS-Exchange-CrossTenant-AuthSource: YQXPR01MB5418.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2025 16:50:33.6037 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4f278736-4ab6-415c-957e-1f55336bd31e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZZ2o6XpisW8lCe6u/e1tDOx4fbX0AjNdxc3O00gFKPNiPgzt4hvRuFikYn0DRbxn6zXyOnqCPQfJlWbSUqmUKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB6604 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 11/18/25 8:32 AM, Andrew Burgess wrote: > Simon Marchi writes: > >> On 11/7/25 4:10 PM, Simon Marchi wrote: >>> From: Simon Marchi >>> >>> When I wrote test gdb.dwarf2/fission-with-type-unit.exp, I did not use >>> build_executable_and_dwo_files, because it wouldn't work to have >>> multiple units in the .dwo file, each referring to their own abbrev >>> table using labels. build_executable_and_dwo_files extracts the .dwo >>> file content from the .o using objcopy (just like gcc does, I learned), >>> meaning that the .dwo file never runs through a linker. Anything >>> needing relocation (like labels pointing to abbrev tables) doesn't work. >>> >>> I instead opted to use gdb_compile_shlib to build the .dwo file on its >>> own, so that those labels would get resolved. That causes problems now >>> that I'm trying to write a test with multiple type units in a .dwo file, >>> where each type unit should be in its own .debug_types section. Running >>> the .dwo file through the linker causes all the .debug_types section to >>> be collapsed into one. And generally, I think it was a bad idea to >>> generate a .dwo file using the linker, since the idea behind .dwo files >>> is that they do not need to be linked (therefore improving link >>> times). We want to produce files as close to what an actual compiler >>> would produce. >>> >>> This patch fixes this by doing what compilers do in the same situation: >>> use a single abbrev table shared by all units in the .dwo file. This >>> requires the following changes in lib/dwarf.exp: >>> >>> - Declare a new variable _dwo_abbrev_num, which holds the next >>> abbrev number to use in the .dwo file's abbrev section >>> (.debug_abbrev.dwo). Initialize this variable to 1. >>> - When producing a CU or TU in a .dwo file, use 0 as the abbrev table >>> offset. >>> - When generating a DIE, return $_dwo_abbrev_num or $_abbrev_num, >>> depending on whether the current CU is in a .dwo file. >>> - After producing a CU or TU in a .dwo file, don't append the >>> terminator byte. >>> - After finishing producing the CUs and TUs, append the terminator byte >>> in .debug_abbrev.dwo if we did output anything there. >>> >>> Update gdb.dwarf2/fission-with-type-units.exp to use >>> build_executable_and_dwo_files, as it should. >> >> I spotted that running this test with the cc-with-gdb-index board now >> shows a new internal error. I just wanted to note that this is not a >> regression, it's actually the test going further and catching an actual >> bug in GDB. Please consider that the following text is appended to the >> commit message. >> >> --- >> With this change, running with the cc-with-gdb-index board, I see: >> >> (gdb) maint expand-symtabs >> /home/smarchi/src/binutils-gdb/gdb/dwarf2/read.c:3056: internal-error: cutu_reader: Assertion `sig_type->signature == cu->header.signature' failed. >> A problem internal to GDB has been detected, >> further debugging may prove unreliable. >> ----- Backtrace ----- >> FAIL: gdb.dwarf2/fission-with-type-unit.exp: maint expand-symtabs (GDB internal error) >> >> This is actually an improvement, as the test case didn't run properly >> before. The compilation failed with: >> >> gdb compile failed, During symbol reading: Could not find DWO CU fission-with-type-unit.dwo(0xf00d) referenced by CU at offset 0xc [in module /home/smarchi/build/binutils-gdb/gdb/testsuite/outputs/gdb.dwarf2/fission-with-type-unit/.tmp/fission-with-type-unit] >> >> The reason was that the old code would try to generate the GDB index >> during this step: >> >> # Build main file. >> if { [build_executable "${testfile}.exp" $binfile \ >> [list ${srcfile} ${main_asm_file}] {nodebug}] } { >> return >> } >> >> ... which is even the DWO file is even generated. With this patch >> things are done in the correct order: > > I cannot parse the "which is even the DWO file is even generated" part > here. Can you reword this? Oops. I meant: ... which is before the DWO file is even generated. If the main file exists but the DWO file doesn't exist yet, and you try to generate an .gdb_index from that, it won't go very well, hopefully that's clear. > >> >> - The -dw.S file is generated >> - The -dw.o file is compiled from the -dw.S >> - The .dwo sections are extracted to the .dwo file, and stripped from >> the -dw.o file >> - The executable is linked from the .o and -dw.o >> - gdb-add-index is ran on the executable > > Not critical, but I think s/ran/run/ would be better. Noted, will fix. Simon