From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4E6A53858281; Wed, 20 Sep 2023 14:05:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E6A53858281 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695218753; bh=zmcY4jxSHjiDfwr/MUqmGKlHX5q3ftJ26fl8elTnLpg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qr0X+bhiKaaLdc+Arx5t0vHMAUvYA6UVchnOMiWoZDEWspKKUVtLbIb7y5+Wib3SO Kd7fjqBn9nPVFYGO170IC9qHTYCUPyVmltKF3qNkH86v7ALLOBdXvxX/NpLRJxUpt2 YXn1iDbAChUj7ApliNz9+KtlqhqFxaIPVvlxNxZQ= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/30838] [gdb/symtab] Support .debug_types section in .gnu_debugaltlink file Date: Wed, 20 Sep 2023 14:05:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30838 --- Comment #4 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D973db6fae304= c2bcafff5f169610f663adc9e817 commit 973db6fae304c2bcafff5f169610f663adc9e817 Author: Tom de Vries Date: Wed Sep 20 16:05:55 2023 +0200 [gdb/symtab] Error out for .debug_types section in dwz file There are two methods to factor out type information in a dwarf4 executable: - use -fdebug-info-types to generate type units in a .debug_types secti= on, and - use dwz to create partial units. The dwz method has an extra benefit: it also allows to factor out information between executables into a newly created .dwz file, pointed to by a .gnu_debugaltlink section. There is nothing prohibiting a .gnu_debugaltlink file to contain a .debug_types section. It's just not generated by dwz or any other tool atm, and consequently = gdb has no support for it. Enhancement PR symtab/30838 is open about the lack = of support. Make the current situation explicit by emitting a dwarf error: ... (gdb) file struct-with-sig-2^M Reading symbols from struct-with-sig-2...^M Dwarf Error: .debug_types section not supported in dwz file^M ... and add an assert in write_gdbindex: ... + /* See enhancement PR symtab/30838. */ + gdb_assert (!(per_cu->is_dwz && per_cu->is_debug_types)); ... to clarify why we can use: ... data_buf &cu_list =3D (per_cu->is_debug_types ? types_cu_list : per_cu->is_dwz ? dwz_cu_list : objfile_cu_list); ... The test-case is a modified copy from gdb.dwarf2/struct-with-sig.exp, s= o it keeps the copyright years range. Tested on x86_64-linux. Tested-By: Guinevere Larsen Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30838 --=20 You are receiving this mail because: You are on the CC list for the bug.=