From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 372A03858C74; Thu, 12 Jan 2023 18:29:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 372A03858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673548178; bh=a4BwtzD121Vv17aasxK7/2DUfINjJSG84RQT8hTq3CU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hqexucyPlnOe8nhQOV0bnciJ9s0jZw+3bPEtX2DMIQKqSVzbw3okWrtuswdvtPrDB Di+yWltM7t8Hrl0hQqZ6JCeNo4jyFk0iikSVnKQEESrCFwvY1ynS/pqPLNr6ohnXBX lI7kHA+eY/1d05A8crKlzFuIBKxc0JNPf53P6kCo= From: "dblaikie at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/49312] Make DW_AT_name contain only simple name, no template-id Date: Thu, 12 Jan 2023 18:29:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dblaikie at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dodji at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D49312 David Blaikie changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dblaikie at gmail dot com --- Comment #4 from David Blaikie --- FWIW I've (partially) implemented this in Clang under the flag `-gsimple-template-names` due to some really large debug info issues with (especially eigen and tensorflow) expression templates (I saw template name= s as long as 50k characters leading to exceeding the 32 bit limit in .debug_str.= dwo sections in dwp files (and gold dwp didn't check for overflow, so this caus= ed silent corruption)). There certainly are some issues with it - my approach didn't simplify all n= ames - certain names aren't easy to roundtrip from the DIE descriptions of the template parameters (lambdas are a great/difficult example, for instance - = the lambda type DIEs don't have anything about the lambda mangling number, etc,= and maybe should - so even in non-template cases the lambdas could be matched up between two TUs (lambdas in inline functions are the same type even in different translation units & should be treated as such)) So there's a bunch of work that'd probably need to be done on template DIE accuracy/completeness before this feature could be adopted wholesale without any exemptions, but for the size benefits (especially in expression template heavy code) I've found it to be worthwhile & we've done some work to flesh = out support for this in lldb as well as identify maybe a couple of gdb bugs rel= ated to this. I've tried to poke dwarf-discuss about the lambda issue in particular ( http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/2022-August/= 007117.html ) but no one seems interested in discussing it. So maybe it's something GCC/Clang/GDB/LLDB folks should discuss more directly together. Also some recent discussion with Simon Marchi on the gdb list: https://sourceware.org/pipermail/gdb/2023-January/050496.html=