public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Christian Biesinger <cbiesinger@google.com>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 2/2] Decode Ada types in Python layer
Date: Thu, 17 Jun 2021 16:10:01 -0500	[thread overview]
Message-ID: <CAPTJ0XH=bbNaaxqhUQn4zcvjrdd1WOowf6uif8efQ2rwx+ocMQ@mail.gmail.com> (raw)
In-Reply-To: <20210617191230.71887-3-tromey@adacore.com>

On Thu, Jun 17, 2021 at 2:31 PM Tom Tromey <tromey@adacore.com> wrote:
> @@ -393,6 +394,14 @@ typy_get_name (PyObject *self, void *closure)
>
>    if (type->name () == NULL)
>      Py_RETURN_NONE;
> +  /* Ada type names are encoded, but it is better for users to see the
> +     decoded form.  */
> +  if (ADA_TYPE_P (type))
> +    {
> +      std::string name = ada_decode (type->name (), false);

Would type->demangled_name() do the right thing? (And should this
respect the demangle option, maybe by calling type->print_name()?)

Christian

  reply	other threads:[~2021-06-17 21:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 19:12 [PATCH 0/2] Change Ada type names reported by Python Tom Tromey
2021-06-17 19:12 ` [PATCH 1/2] Add non-wrapping mode to ada_decode Tom Tromey
2021-06-17 19:12 ` [PATCH 2/2] Decode Ada types in Python layer Tom Tromey
2021-06-17 21:10   ` Christian Biesinger [this message]
2021-06-18 15:09     ` Tom Tromey
2021-06-18 16:25       ` Christian Biesinger
2021-06-22 16:56         ` Tom Tromey
2021-06-25 14:02 ` [PATCH 0/2] Change Ada type names reported by Python Tom Tromey

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='CAPTJ0XH=bbNaaxqhUQn4zcvjrdd1WOowf6uif8efQ2rwx+ocMQ@mail.gmail.com' \
    --to=cbiesinger@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.com \
    /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).