Re: [PATCH 2/2] Decode Ada types in Python layer

Christian Biesinger via Gdb-patches
2021-06-17T21:11:00Z

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