From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 52D313858C31; Mon, 2 Oct 2023 08:31:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 52D313858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1696235502; bh=XUtwanCABObx0sVV8MRwyCUR5RLDOtDA9Ey9UQcOiFk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eRe+hLKYOArgURyzFMB5xiiLkeqZjqn1xmO3zEsIu+lft54S5W2FaH1e1ylh9kXv9 XrWOFhxlPnA2Ez4cY7GLQvg4ecjacyTt6stTlvdkEePJLu8QMecdMnL5nCnDedETyt HdE9tTcDHUlDps9ANB9zrEdxPKTW0pAx3mSGU1Ik= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug go/27238] [gcc-11] FAIL: gdb.go/package.exp: setting breakpoint at package2.Foo Date: Mon, 02 Oct 2023 08:31:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: go 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=3D27238 --- Comment #7 from Tom de Vries --- With this patch: ... diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 5bbc8e24cf9..c4c3afd0141 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -7142,6 +7142,18 @@ dwarf2_physname (const char *name, struct die_info *= die, struct dwarf2_cu *cu) if (cu->language_defn->store_sym_names_in_linkage_form_p ()) { /* Do nothing (do not demangle the symbol name). */ + if (cu->lang () =3D=3D language_go) + { + char *s; + if (startswith (mangled, "go_0")) + { + s =3D strdup (mangled + 1); + s[0] =3D 'g'; + s[1] =3D 'o'; + s[2] =3D '.'; + demangled.reset (s); + } + } } else { ... I manage to do: ... $ gdb -q -batch package -ex "b go.package2.Foo"=20 Breakpoint 1 at 0x404228: file package2.go, line 5. ... --=20 You are receiving this mail because: You are on the CC list for the bug.=