From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1]) by sourceware.org (Postfix) with ESMTPS id B0D50383F40B for ; Fri, 18 Jun 2021 15:09:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B0D50383F40B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 639CB5600A; Fri, 18 Jun 2021 11:09:30 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id bTKz8iSf+IYd; Fri, 18 Jun 2021 11:09:30 -0400 (EDT) Received: from murgatroyd (97-122-70-83.hlrn.qwest.net [97.122.70.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 0715656005; Fri, 18 Jun 2021 11:09:29 -0400 (EDT) From: Tom Tromey To: Christian Biesinger Cc: Tom Tromey , gdb-patches Subject: Re: [PATCH 2/2] Decode Ada types in Python layer References: <20210617191230.71887-1-tromey@adacore.com> <20210617191230.71887-3-tromey@adacore.com> X-Attribution: Tom Date: Fri, 18 Jun 2021 09:09:29 -0600 In-Reply-To: (Christian Biesinger's message of "Thu, 17 Jun 2021 16:10:01 -0500") Message-ID: <87im2bus46.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP 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: Fri, 18 Jun 2021 15:09:31 -0000 >> + /* 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); Christian> Would type->demangled_name() do the right thing? (And should this Christian> respect the demangle option, maybe by calling type->print_name()?) I don't think there is a demangled_name method on type, only on symbol. It may make sense to add one, though this is really only an issue for Ada AFAIK. Tom