From: Tom Tromey <tom@tromey.com>
To: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Cc: Tom de Vries <tdevries@suse.de>
Subject: Re: [PATCH] [gdb/go] Handle v3 go_0 mangled prefix
Date: Thu, 05 Oct 2023 10:47:24 -0600 [thread overview]
Message-ID: <87o7hdvwwz.fsf@tromey.com> (raw)
In-Reply-To: <20231005145009.31650-1-tdevries@suse.de> (Tom de Vries via Gdb-patches's message of "Thu, 5 Oct 2023 16:50:09 +0200")
>>>>> "Tom" == Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> writes:
Tom> A new v3 mangling scheme was used. The mangling schemes define a separator
Tom> character and mangling character:
Tom> - for v2, dot is used both as separator character and mangling character, and
Tom> - for v3, dot is used as separator character and underscore as mangling
Tom> character.
Tom> For more details, see [1] and [2].
Tom> In v3, "_0" demangles to ".". [ See gcc commit a01dda3c23b ("compiler, libgo:
Tom> change mangling scheme"), function Special_char_code::Special_char_code. ]
Tom> Handle the new go_0 prefix in unpack_mangled_go_symbol, which fixes the
Tom> test-case.
Looks good to me.
It took me a little while to realize that this:
Tom> gdb::unique_xmalloc_ptr<char> result = make_unique_xstrdup (mangled_name);
Tom> buf = result.get ();
...
Tom> + /* Skip the '\0'. */
Tom> + buf++;
... is ok, but it is because the callers only use the unique_xmalloc_ptr
to manage the memory, they don't examine the pointer directly.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
prev parent reply other threads:[~2023-10-05 16:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 14:50 Tom de Vries
2023-10-05 16:47 ` Tom Tromey [this message]
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=87o7hdvwwz.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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).