From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id NHEmHQsq5F9RLwAAWB0awg (envelope-from ) for ; Thu, 24 Dec 2020 00:41:31 -0500 Received: by simark.ca (Postfix, from userid 112) id 62A9F1F0AA; Thu, 24 Dec 2020 00:41:31 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [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 F37801E99A for ; Thu, 24 Dec 2020 00:41:30 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CC698389680E; Thu, 24 Dec 2020 05:41:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC698389680E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1608788489; bh=p5MpgV0/xZJBePa7RZD0FqqqlCFFweqZddsBmdy6fM0=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=m+pa4VyLe8ypm8pzUsed+nxMNhOIc0439KIpSFPcT66KAKgH65EWoDo76KPZ8+sad 5IzBJzE+hOBxruixAxuaO/2XnIfkxFGDY5TwZ2ZP3N4HYJgRk27YfOq4qX/yPrXkXb AhIuCt0Xl9KG415A1u2cpy61HLHkaL284tAdA6Iw= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id A26F13857C6C for ; Thu, 24 Dec 2020 05:41:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A26F13857C6C Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 0BO5fLGg014670 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 24 Dec 2020 00:41:26 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 0BO5fLGg014670 Received: from [10.0.0.213] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 037201E99A; Thu, 24 Dec 2020 00:41:20 -0500 (EST) Subject: Re: [PATCH 1/2] gdb: include allocated/associated properties in 'maint print type' To: Andrew Burgess , gdb-patches@sourceware.org References: Message-ID: Date: Thu, 24 Dec 2020 00:41:20 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 24 Dec 2020 05:41:21 +0000 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: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2020-12-23 6:53 p.m., Andrew Burgess wrote: > Adds the allocated and associated dynamic properties into the output > of the 'maintenance print type' command. > > gdb/ChangeLog: > > * gdbtypes (recursive_dump_type): Include allocated and associated > properties. > --- > gdb/ChangeLog | 5 +++++ > gdb/gdbtypes.c | 18 ++++++++++++++++++ > 2 files changed, 23 insertions(+) > > diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c > index 569e7a3e659..8e90c4b108b 100644 > --- a/gdb/gdbtypes.c > +++ b/gdb/gdbtypes.c > @@ -5269,6 +5269,24 @@ recursive_dump_type (struct type *type, int spaces) > } > puts_filtered ("\n"); > printf_filtered ("%*snfields %d ", spaces, "", type->num_fields ()); > + if (TYPE_ASSOCIATED_PROP (type) != nullptr > + || TYPE_ALLOCATED_PROP (type) != nullptr) > + { > + printf_filtered ("%*s", spaces, ""); > + if (TYPE_ASSOCIATED_PROP (type) != nullptr) > + { > + printf_filtered ("associated "); > + dump_dynamic_prop (*TYPE_ASSOCIATED_PROP (type)); > + } > + if (TYPE_ALLOCATED_PROP (type) != nullptr) > + { > + if (TYPE_ASSOCIATED_PROP (type)) != nullptr Otherwise, LGTM. Simon