From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 233DA3858D39; Mon, 27 Mar 2023 11:29:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 233DA3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679916598; bh=fldOcX0+h4bAsHIYR5LfQh/WpIHQuK8+91Qg1cVr/G4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RsaGGAT0WsJCYMRzjtla7y2buUsxQRIVbKmL9RgZePP2gda+CAlGKTAHuoEDyT/bT Lt7EkbquZcH/vG0QC8EuOnBfFcOefoU4uQ5k80NEukTG6hb5jP8g/AAEvPrrUAdyao kLOl4FRE2RMDCg6RtyoZxbL4UUIr8QeNn1UcERsE= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/30276] [gdb/symtab] function name is _Dmain instead of "D main" Date: Mon, 27 Mar 2023 11:29:58 +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: vries 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=3D30276 --- Comment #2 from Tom de Vries --- (In reply to Tom de Vries from comment #1) > But I have no idea whether this is correct. Maybe this needs to be handl= ed > somehow in dwarf2_physname instead? In dwarf2_physname we do: ... dwarf2_physname (name=3D0x364ce9b "D main", die=3D0x35deb80, cu=3D0x2bc90f0= ) at /data/vries/gdb/src/gdb/dwarf2/read.c:7097 7097 struct objfile *objfile =3D cu->per_objfile->objfile; (gdb) n 7098 const char *retval, *mangled =3D NULL, *canon =3D NULL; (gdb)=20 7099 int need_copy =3D 1; (gdb)=20 7103 if (!die_needs_namespace (die, cu)) (gdb)=20 7106 if (cu->lang () !=3D language_rust) (gdb)=20 7107 mangled =3D dw2_linkage_name (die, cu); (gdb)=20 7111 gdb::unique_xmalloc_ptr demangled; (gdb)=20 7112 if (mangled !=3D NULL) (gdb)=20 7114 if (cu->language_defn->store_sym_names_in_linkage_form_p ()) (gdb)=20 7128 demangled =3D gdb_demangle (mangled, (DMGL_PARAMS | DMGL_= ANSI (gdb)=20 7131 if (demangled) (gdb)=20 7135 canon =3D mangled; (gdb)=20 7136 need_copy =3D 0; (gdb)=20 7140 if (canon =3D=3D NULL || check_physname) (gdb)=20 7168 retval =3D canon; (gdb)=20 7170 if (need_copy) (gdb)=20 7173 return retval; (gdb) p retval $8 =3D 0x364cea2 "_Dmain" ... --=20 You are receiving this mail because: You are on the CC list for the bug.=