From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id vqxaLWS6y2AbNgAAWB0awg (envelope-from ) for ; Thu, 17 Jun 2021 17:11:00 -0400 Received: by simark.ca (Postfix, from userid 112) id A8DA11F163; Thu, 17 Jun 2021 17:11:00 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DBABC1E54D for ; Thu, 17 Jun 2021 17:10:59 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 709463AA9C35 for ; Thu, 17 Jun 2021 21:10:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 709463AA9C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1623964259; bh=aldcHK873hupYKRRfrPbZ0lInjL/udUbMamI9Mid41M=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=fjwTKsBW/5A7Qaf+mNls7NrHFhURf3FNRivCU+Vng6f65crsjnklAxZNg8lwIP/Yq CG3+jgvy8ZaUriB9YDF5o/kGXBQWzNTZ50O4XUL/WNlhDF4ngZ6XM4LJSC6EFBAh2S oLRr0ncS9vZlQx+o3pdECG3WqZwkINQ9apmJcMic= 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> 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 Content-Type: text/plain; charset="UTF-8" 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: , From: Christian Biesinger via Gdb-patches Reply-To: Christian Biesinger Cc: gdb-patches Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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