Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: "gdb-patches\@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: Re: [RFA] mi/10586
Date: Tue, 13 Dec 2011 19:58:00 -0000	[thread overview]
Message-ID: <m3ehw8b6rb.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4ED95103.8030204@redhat.com> (Keith Seitz's message of "Fri, 02	Dec 2011 14:28:19 -0800")

>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> +/* The names of varobjs representing anonymous structs or unions.
Keith> +   Note that is_name_anonymous_type makes assumptions about these two
Keith> +   constants.  */

I didn't see 'is_name_anonymous_type' anywhere in the tree or in the patch.
I guess it needs an update.

Keith> +static int
Keith> +is_path_expr_parent (struct varobj *var)
[...]
Keith> +  type  = get_value_type (var);

Extra space.

Keith> +  return strncmp (child->name, ANONYMOUS_STRUCT_NAME, 11) == 0;

I think this is wrong since the macros have _() in their expansion.
I think you have to use strlen.

Keith> +	field_name = TYPE_FIELD_NAME (type, index);
Keith> +	if (*field_name == '\0')

Can field_name == NULL?
It is not clear to me.  There is some code in gdb that checks this, but
I don't know whether that is defensive programming or checking a
condition that is truly possible.

Otherwise this looks good to me.

Tom


  parent reply	other threads:[~2011-12-13 19:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-11 21:30 Keith Seitz
2011-11-14 15:45 ` Tom Tromey
2011-11-14 18:04   ` Keith Seitz
2011-11-14 18:18     ` Tom Tromey
2011-11-14 19:28       ` Keith Seitz
2011-11-14 20:28         ` Tom Tromey
2011-11-15 17:10           ` Keith Seitz
2011-11-15 17:30             ` Tom Tromey
2011-12-02 22:28             ` Keith Seitz
2011-12-13  1:28               ` Keith Seitz
2011-12-13 19:58               ` Tom Tromey [this message]
2011-12-17  1:55                 ` Keith Seitz
2011-12-20 16:03                   ` Tom Tromey
2012-01-12 23:05                     ` Keith Seitz
2011-12-13 20:34               ` Crash regression with Eclipse [Re: [RFA] mi/10586] Jan Kratochvil

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=m3ehw8b6rb.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.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