From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) by sourceware.org (Postfix) with ESMTPS id 0A1503855004 for ; Fri, 18 Jun 2021 16:26:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0A1503855004 Received: by mail-qv1-xf2a.google.com with SMTP id c10so3836129qvo.9 for ; Fri, 18 Jun 2021 09:26:27 -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=3WTgw+sEKZL+IYbufWsp+m74MNQ9+OB+KiOpkFWTP6Q=; b=Dp5ycPfuWf0BhSbV/Uk5s/QmNZ95cnnIzmlNa2l5/lJbZ/JiPr0N1Q5C5IREu6O5II vJpVFt6Jpya8pi6hb529hEQOaG/n7Ii8vG9QMIL5bKckdZ9eHIBHElIoK/FA3x44YkHJ HfvWT1b4fSim2YhTiuiCxUFfQ1JIyOUMioyyny1T/AwsUmgi2U1jEbBB2T4s9nHw3Vfl W0T76NIYl7cOEJPNWswQxXKbtu3nlwpAIw/ibPtotgAM8cHjRQls6ncnaI66azWwGtg4 aRaL+Pnrqu/e5IhFGiUrG5mUgdj6TjSy38y/yui3tp+uAaNBtHrrvV/T8Bm2c4Ij6uno L1Nw== X-Gm-Message-State: AOAM532DjJCD/63udeyPwgO+kwDcDnqmSWfHN8r6hNkca191uGhS/4KF fZevSHAGDUIbgKRLoFreX6D7ushlqwgrdcLw/iSiahS9Y7Q= X-Google-Smtp-Source: ABdhPJyF1Tx7wQf13yTgjlVB1xJ6gsSCd5O9eYs21qw5ydZTlxmubb31ZRvkmtwvSiEP9E61NLJB8tonz1Y7hKJ2U2A= X-Received: by 2002:a0c:eb85:: with SMTP id x5mr6504319qvo.1.1624033586370; Fri, 18 Jun 2021 09:26:26 -0700 (PDT) MIME-Version: 1.0 References: <20210617191230.71887-1-tromey@adacore.com> <20210617191230.71887-3-tromey@adacore.com> <87im2bus46.fsf@tromey.com> In-Reply-To: <87im2bus46.fsf@tromey.com> From: Christian Biesinger Date: Fri, 18 Jun 2021 11:25:48 -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=-17.8 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: Fri, 18 Jun 2021 16:26:28 -0000 On Fri, Jun 18, 2021 at 10:09 AM Tom Tromey wrote: > > >> + /* 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. Oops, yes, I got myself confused. But even so, should it respect the "demangle" setting? Christian