From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 087013858C83; Mon, 27 Mar 2023 10:51:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 087013858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679914271; bh=xwpg37d7ByXmriQujtHhhZNyqk/CqYJeL7WLsd0tV+g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PJ+E4YhldgdLDW2JqV6lpmx9FCAibfpTeatenxBKKW6EQOdPHvTdBSoZslvgto0a8 hdl7IvmQADBW+6J7tsu0pGSAHirNJoQXArT5fu/eK2dpGmQE4TY/N3roSo9LAloHex h1W+s1RkV85rvcdaqbLVGCf5qfvLCOiPofToukJA= 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 10:51:10 +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: cc 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 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at sourceware dot o= rg --- Comment #1 from Tom de Vries --- Using this patch: ... diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index c910be875a3..ea81d75b983 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -18812,7 +18812,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu, /* Fortran does not have mangling standard and the mangling does dif= fer between gfortran, iFort etc. */ const char *physname - =3D (cu->lang () =3D=3D language_fortran + =3D ((cu->lang () =3D=3D language_fortran || cu->lang () =3D=3D lan= guage_d) ? dwarf2_full_name (name, die, cu) : dwarf2_physname (name, die, cu)); const char *linkagename =3D dw2_linkage_name (die, cu); ... we have: ... $ gdb -q -batch simple -ex start=20 Temporary breakpoint 1 at 0x43844e: file src/gdb/testsuite/gdb.dlang/simple= .d, line 17. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". ... Temporary breakpoint 1, D main () at src/gdb/testsuite/gdb.dlang/simple.d:17 17 } ... But I have no idea whether this is correct. Maybe this needs to be handled somehow in dwarf2_physname instead? --=20 You are receiving this mail because: You are on the CC list for the bug.=