From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D1C1B395A406; Wed, 29 Apr 2020 12:50:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1C1B395A406 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588164644; bh=DJTOaU7Z9ihtTqM99JXMDqpDQzwfEtOgoHEZxvGx8H4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rHbjtGGp/WYqHAuF355RvW+YGzaCawR7yNpmImNClvCsxyiHRwbpR6CAjMtkGYDbw tpU2KT7Xoyr5ARqocsji0Qb7H7yp7e532DAx0raBM1lsfnhzVokXmgr+XOTPzB2pCg Ikg6yF02oi+Hi7ia2IOcl0YiR63OknhBrLn+4ec0= From: "robert at ocallahan dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information Date: Wed, 29 Apr 2020 12:50:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 7.2.0 X-Bugzilla-Keywords: wrong-debug X-Bugzilla-Severity: normal X-Bugzilla-Who: robert at ocallahan dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.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://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2020 12:50:44 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D81932 --- Comment #30 from robert at ocallahan dot org --- (In reply to Xi Ruoyao from comment #27) > Yes. Could GDB search the symbol with linkage name? This might work for function names but if you're trying to look up a type n= ame (e.g. for a cast expression) this doesn't work because types don't have lin= kage names. We can often find a mangled name for a type as part of a function or global variable linkage name, but we can't guarantee that. Taking a user-provided type name and converting it into something we can lo= ok up in DWARF is already pretty hard due to C++ vagaries, but not knowing how= the compiler canonicalizes these names makes it even harder, and it would simpl= ify things if the compiler at least matches the demangler.=