From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SDjtI6HY419QJgAAWB0awg (envelope-from ) for ; Wed, 23 Dec 2020 18:54:09 -0500 Received: by simark.ca (Postfix, from userid 112) id 916451F0AA; Wed, 23 Dec 2020 18:54:09 -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.4 required=5.0 tests=DKIM_SIGNED,MAILING_LIST_MULTI, RDNS_NONE,T_DKIM_INVALID,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 326241E590 for ; Wed, 23 Dec 2020 18:54:09 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4CDF73893666; Wed, 23 Dec 2020 23:54:08 +0000 (GMT) Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id ECFFF3857004 for ; Wed, 23 Dec 2020 23:54:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ECFFF3857004 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wm1-x32d.google.com with SMTP id c133so278548wme.4 for ; Wed, 23 Dec 2020 15:54:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TBw3QRopCPSgbNDtFYOzrxyjGZ4zw0lPsMaTaYXsucQ=; b=cdK5NPf6MUyZb8u2sUIGkDUfqgsr6GkqsL82uKjDQjQtanezoyzZYLFDbMcJKtSpEM k040V1OZ/csFSfEYnm14TyXq0ZTLVa1xN3Uhzqpjih6q1UG7V2/Jn6dbpHua6nYo0TvV hxiiKAqsk5BDZPoKopheFlPpekxfA/qLEa1AsK15WBOpx5hiPEpU2YsRgrOaOKWMS8Nm eUvdWcSTlx317QHTDa0TnLV9SH/mWymKFqvhvGgZdlRxyXhHShEG+/TKQeicvy+smjWb /l9KN5LgYj0TtFqBZGLtXY4OfYLiHQKWHo1DwbAJDgpCmnilgWvgP9SmwAVo9vH3bvFw g5FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TBw3QRopCPSgbNDtFYOzrxyjGZ4zw0lPsMaTaYXsucQ=; b=Bukri3xcTcEhrj7Ij1H1dM86XBRWZMJHnRi7zt0LhvAZ+2ZGFu1xPTTGAx6YJp6d6G QR4eR3MGT8OlPh1HKcelKE+o2EDRo2FLGOb7hypR8NXMBqj1KgJxk8i/6j3wBR5LIfu1 WSeFvUZSlqbL8XmAx8IkUeJ+SQeR8NbQYlfCfnbjOnlEG+4eT9PpjwQ+DgotgT/ztXjx ItC6q6FHaZ7ZvyhwODO4kVmoRhr/Mmm58ABFi9Frc+pEp0MZznLDShRnuqEmzG4q1TUl fpljBANrY2JGHNuVhbL0pGkKJckascfkrD+JgeX0v+0GTLYVSDTFWs/gX2nudjvNizTa 1HPw== X-Gm-Message-State: AOAM531wNbw9jBN7EQOjrFI0qj8/5o3uifwPXcr/WQLCIYISXnKKo49A 01LORU8h3d1J6HHLj+Y/30B2sclUFMjNGg== X-Google-Smtp-Source: ABdhPJxDPqwUn2EbYQTgyHoHvPJzmYyE87mbnMSneGSEKmK53rHG9UajcceQRvt7IQ3X/x7/h2aJeA== X-Received: by 2002:a1c:2203:: with SMTP id i3mr1786388wmi.6.1608767644907; Wed, 23 Dec 2020 15:54:04 -0800 (PST) Received: from localhost (host109-154-20-128.range109-154.btcentralplus.com. [109.154.20.128]) by smtp.gmail.com with ESMTPSA id u13sm36620631wrw.11.2020.12.23.15.54.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Dec 2020 15:54:04 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Subject: [PATCH 1/2] gdb: include allocated/associated properties in 'maint print type' Date: Wed, 23 Dec 2020 23:53:54 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" 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)) + printf_filtered (" "); + printf_filtered ("allocated "); + dump_dynamic_prop (*TYPE_ALLOCATED_PROP (type)); + } + printf_filtered ("\n"); + } gdb_print_host_address (type->fields (), gdb_stdout); puts_filtered ("\n"); for (idx = 0; idx < type->num_fields (); idx++) -- 2.25.4