Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Gary Benson <gbenson@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA 4/4 take 2] Improved linker-debugger interface
Date: Tue, 31 Jul 2012 12:12:00 -0000	[thread overview]
Message-ID: <20120731121149.GA4756@redhat.com> (raw)
In-Reply-To: <87394fhbv1.fsf@fleche.redhat.com>

Tom Tromey wrote:
> >>>>> "Gary" == Gary Benson <gbenson@redhat.com> writes:
> 
> Gary> +static struct probe_and_info *
> Gary> +solib_event_probe_at (struct svr4_info *info, struct bp_location *loc,
> Gary> +		      struct probe_and_info *result)
> 
> I think this would be clearer if it just returned a boolean.
> 
> Gary> +  if (probe_argc == 2)
> Gary> +    action = NAMESPACE_RELOAD;
> Gary> +  else if (probe_argc < 2)
> Gary> +    return NAMESPACE_TABLE_INVALIDATE;
> Gary> +
> Gary> +  return action;
> 
> Perhaps that first 'return' could be an assignment to 'action'.
> 
> Gary> +static hashval_t
> Gary> +hash_namespace (const PTR p)
> 
> Use 'void *' instead of PTR.  This occurs in a few spots.
> PTR is obsolete.
> 
> Gary> +  const struct namespace *ns = (const struct namespace *) p;
> 
> You don't need a cast here.
> 
> Gary> +  const struct namespace *ns1 = (const struct namespace *) p1;
> Gary> +  const struct namespace *ns2 = (const struct namespace *) p2;
> 
> Here either.
> 
> Gary> +  struct namespace *ns = (struct namespace *) p;
> 
> Here either.
> 
> Gary> +      ns = xcalloc (sizeof (struct namespace), 1);
> 
> I think it is more normal to use XCNEW (struct namespace) here.
> xcalloc with 1 element is "funny".  There's a lot of odd little
> macros like this, used inconsistently...

Attached is an updated version of this patch with these fixes.

> The rest of the patch looks good to me.  However, I think we should
> refrain from putting it in until the probes go in to glibc.  If this
> makes a chicken-and-egg problem somehow, we can suggest simultaneous
> approval or the like.

Probes are in glibc as of Friday:

  http://sourceware.org/ml/libc-alpha/2012-07/msg00557.html

Cheers,
Gary

-- 
http://gbenson.net/


  reply	other threads:[~2012-07-31 12:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19 11:09 Gary Benson
2012-07-25 19:36 ` Tom Tromey
2012-07-31 12:12   ` Gary Benson [this message]
2012-07-31 12:13     ` Gary Benson
2012-08-14 19:49       ` Tom Tromey
2012-08-15 17:24 ` Jan Kratochvil
2012-08-15 17:46   ` Jan Kratochvil
2012-08-16 11:14     ` Gary Benson
2012-08-16 15:52     ` Gary Benson
2012-08-17 10:54       ` Gary Benson
2012-08-17 16:41         ` Jan Kratochvil
2012-09-19  9:49   ` Gary Benson
2012-09-19 11:14     ` Jan Kratochvil
2012-09-19 15:06       ` Gary Benson
2012-09-19 15:13         ` Jan Kratochvil
2012-09-21 12:36           ` Gary Benson
2012-09-21 14:46             ` Jan Kratochvil
2012-09-28 10:51               ` Gary Benson
2012-09-28 10:58                 ` 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=20120731121149.GA4756@redhat.com \
    --to=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@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