Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Andrew Burgess <andrew.burgess@embecosm.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] gdb: include allocated/associated properties in 'maint print type'
Date: Thu, 24 Dec 2020 00:41:20 -0500	[thread overview]
Message-ID: <c00fb52a-9332-c6ff-7234-c83e9bd0ab84@polymtl.ca> (raw)
In-Reply-To: <a24f5607c4bd222d2da3cf7763fa171f526df9b2.1608767467.git.andrew.burgess@embecosm.com>



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

  reply	other threads:[~2020-12-24  5:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-23 23:53 [PATCH 0/2] Avoid resolving dynamic properties for non-allocated arrays Andrew Burgess
2020-12-23 23:53 ` [PATCH 1/2] gdb: include allocated/associated properties in 'maint print type' Andrew Burgess
2020-12-24  5:41   ` Simon Marchi via Gdb-patches [this message]
2020-12-23 23:53 ` [PATCH 2/2] gdb: avoid resolving dynamic properties for non-allocated arrays Andrew Burgess
2020-12-24 14:46   ` Simon Marchi via Gdb-patches
2020-12-24 17:04     ` Andrew Burgess

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c00fb52a-9332-c6ff-7234-c83e9bd0ab84@polymtl.ca \
    --to=gdb-patches@sourceware.org \
    --cc=andrew.burgess@embecosm.com \
    --cc=simon.marchi@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox