Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Walfred Tedeschi <walfred.tedeschi@intel.com>
Cc: gdb-patches@sourceware.org, drow@false.org
Subject: Re: [PATCH] Fix display of structures/bitfields in register description.
Date: Wed, 24 Apr 2013 20:50:00 -0000	[thread overview]
Message-ID: <87wqrrn7ki.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1366812163-27865-1-git-send-email-walfred.tedeschi@intel.com>	(Walfred Tedeschi's message of "Wed, 24 Apr 2013 16:02:43 +0200")

>>>>> "Walfred" == Walfred Tedeschi <walfred.tedeschi@intel.com> writes:

Walfred> Add support for displaying structures and bitfields for
Walfred> registers when executing the "maint print c-tdesc". Command is
Walfred> also used when converting the xml target description file into
Walfred> c file.

Thanks for the patch.

I think it looks pretty good.  I have a few notes.

Walfred> +	    case TDESC_TYPE_STRUCT:
Walfred> +	      printf_unfiltered
Walfred> +		("  type = tdesc_create_struct (feature, \"%s\");\n",

This emits code to assign to the variable "type".
But is this variable defined?
Earlier I see:

	  if (type->kind == TDESC_TYPE_UNION
	      && VEC_length (tdesc_type_field, type->u.u.fields) > 0)
	    {
	      printf_unfiltered ("  struct tdesc_type *type;\n");

... which I think is the only spot where it is defined.

If this is correct then I think changing this to also check
TDESC_TYPE_STRUCT would be appropriate.

If it isn't correct, then I'm curious to know what defines 'type' in the
output.

Walfred> +global srcdir
Walfred> +global subdir

I don't think these are needed.

Walfred> +<!-- Copyright (C) 2013 Free Software Foundation, Inc.
Walfred> +
Walfred> +     Copying and distribution of this file, with or without modification,
Walfred> +     are permitted in any medium without royalty provided the copyright
Walfred> +     notice and this notice are preserved.  -->

I think this should be the usual GPL comment.

Tom


  reply	other threads:[~2013-04-24 17:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-24 17:30 Walfred Tedeschi
2013-04-24 20:50 ` Tom Tromey [this message]
2013-04-25 16:18   ` Tedeschi, Walfred
2013-04-25 19:35     ` Tom Tromey
2013-04-25 19:39       ` Tedeschi, Walfred
2013-04-29 14:23       ` Daniel Jacobowitz
2013-04-29 19:56         ` Tom Tromey
2013-04-29 20:24         ` Tedeschi, Walfred
2013-04-30  7:27           ` Tom Tromey
2013-04-25 19:50 Walfred Tedeschi

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=87wqrrn7ki.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=walfred.tedeschi@intel.com \
    /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