public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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	[thread overview]
Message-ID: <bug-27238-4717-N3wWpMS4ik@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27238-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=27238

--- Comment #7 from Tom de Vries <vries at gcc dot gnu.org> ---
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 () == language_go)
+           {
+             char *s;
+             if (startswith (mangled, "go_0"))
+               {
+                 s = strdup (mangled + 1);
+                 s[0] = 'g';
+                 s[1] = 'o';
+                 s[2] = '.';
+                 demangled.reset (s);
+               }
+           }
        }
       else
        {
...
I manage to do:
...
$ gdb -q -batch package -ex "b go.package2.Foo" 
Breakpoint 1 at 0x404228: file package2.go, line 5.
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-10-02  8:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 12:33 [Bug go/27238] New: " vries at gcc dot gnu.org
2021-01-26  7:54 ` [Bug go/27238] " vries at gcc dot gnu.org
2021-01-26  8:42 ` vries at gcc dot gnu.org
2021-01-26  8:43 ` vries at gcc dot gnu.org
2023-01-19 21:41 ` tromey at sourceware dot org
2023-02-17  0:41 ` tromey at sourceware dot org
2023-02-17  0:41 ` tromey at sourceware dot org
2023-10-02  8:31 ` vries at gcc dot gnu.org [this message]
2023-10-02  9:14 ` vries at gcc dot gnu.org
2023-10-02 11:33 ` vries at gcc dot gnu.org
2023-10-02 18:50 ` ian at airs dot com
2023-10-02 21:53 ` ian at airs dot com
2023-10-05  8:44 ` vries at gcc dot gnu.org
2023-10-05 13:10 ` vries at gcc dot gnu.org
2023-10-05 14:51 ` vries at gcc dot gnu.org
2023-10-05 21:22 ` cvs-commit at gcc dot gnu.org
2023-10-05 21:23 ` vries at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-27238-4717-N3wWpMS4ik@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).