From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by sourceware.org (Postfix) with ESMTPS id C433A3AA991C for ; Thu, 17 Jun 2021 21:10:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C433A3AA991C Received: by mail-qv1-xf2e.google.com with SMTP id u14so2475459qvq.6 for ; Thu, 17 Jun 2021 14:10:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aldcHK873hupYKRRfrPbZ0lInjL/udUbMamI9Mid41M=; b=LZAhOjkZxftvyyKUYmxwcY6Jydr6DKMLXrwH6nqjv43PkdUyzdJBK57lRsvccqaJde eLds+/QNWB7oN+vM3MFGijKVCCB3Zw/7EuiT1jhJhI+4iv7wTezcUQezCzAiLtc52CJF 8q3XKh/7Q8wfizGUiJXYv8WyoByaPFWq539pYM1Uj116MvapPwrryC/R4QE4hh8gK+0Z tAQF76RTttmrAZL8+kqRw9r7/bn8DqoTGeB3Uc8vM8kvtVcjiaY48NKhQ30lVIjKh9fV OWt8nD0rJQ4549JGgwuu0OsBFya8StRpjWtUE0secvrIBy3lGUX19oLz5Fflfej0YEF/ YgeQ== X-Gm-Message-State: AOAM5330R4ruMW9m2RVCwWkTYNaAZ+Dh/Y6Yp25ryhA6FfgnkkxlQ7E7 3PkhrS23Ai6hgYE2MpqJaDlFy9/+kn7QTcTnCGVc8DVUF90= X-Google-Smtp-Source: ABdhPJwZWrcnJBOHX6WVH78GQbMUbJuqJQ+HcH1OxVzIxyAWKb+2QldZO1ubAeiUDfhhPMCTKi6/RwQTDjn1XwLpCHk= X-Received: by 2002:a0c:ff25:: with SMTP id x5mr2073207qvt.39.1623964239123; Thu, 17 Jun 2021 14:10:39 -0700 (PDT) MIME-Version: 1.0 References: <20210617191230.71887-1-tromey@adacore.com> <20210617191230.71887-3-tromey@adacore.com> In-Reply-To: <20210617191230.71887-3-tromey@adacore.com> From: Christian Biesinger Date: Thu, 17 Jun 2021 16:10:01 -0500 Message-ID: Subject: Re: [PATCH 2/2] Decode Ada types in Python layer To: Tom Tromey Cc: gdb-patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-18.2 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jun 2021 21:10:41 -0000 On Thu, Jun 17, 2021 at 2:31 PM Tom Tromey 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