From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 22BDF3858CDB; Tue, 1 Nov 2022 20:42:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22BDF3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667335341; bh=0zcqTyAh5/p8MMj9yUeFRaPcHx4b8iCms6eIW8RRgb8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SVBIRPR7ee/z23zYNz+av3PTGgPazD756NzTGD+pAukdm5z9pIktYg98OlL5E5GLe hIL12pn7qVfqUXQ8grRhb9u0V4ct3+YMeoTLomnB5vxQSy4fzkjYcyMSMRG7ZhwjET XZIzgXNEpNjDeAHdLn70c8bftoXs6upcym8zO5lA= From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug symtab/29105] new DWARF reader still slow Date: Tue, 01 Nov 2022 20:42:05 +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: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey at sourceware dot org X-Bugzilla-Target-Milestone: 13.1 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=3D29105 --- Comment #15 from Tom Tromey --- I've been debugging this a bit. For the sizeof test, gdb makes an index entry for "short int". This comes directly from the DWARF: <1>: Abbrev Number: 2 (DW_TAG_base_type) DW_AT_byte_size : 2 DW_AT_encoding : 5 (signed) DW_AT_name : (indirect string, offset: 0x120): short int lookup_signed_typename first looks for "signed short" though. (top-gdb) up #15 0x00000000007bb408 in lookup_typename (language=3D0x24c0da0 , name=3D0x7fffffffab50 "signed short", block=3D0x0,=20 noerr=3D1) at ../../binutils-gdb/gdb/gdbtypes.c:1700 (top-gdb) up #16 0x00000000007bb5ac in lookup_signed_typename (language=3D0x24c0da0 , name=3D0x12528f8 "short") at ../../binutils-gdb/gdb/gdbtypes.c:1729 Now, trying this with an older gdb shows that psyms also make these same symbol names: (gdb) maint print psymbols=20 [...] `short int', type, 0x0 I'm not sure why it works in this case and not in the new code. I added a 'maint canonicalize' command and it shows: (gdb) maint canonicalize short No change. (gdb) maint canonicalize short int canonical =3D short (gdb) maint canonicalize signed short int canonical =3D short (gdb) maint canonicalize signed short=20 canonical =3D short That is, one oddity here is that the C++ canonical form for these names differs from what's in the DWARF and what things like lookup_signed_typename expect. Next I'm going to look at canonicalization for C, at least for those types that have multiple spellings. --=20 You are receiving this mail because: You are on the CC list for the bug.=