From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFA 4/4 take 2] Improved linker-debugger interface
Date: Wed, 25 Jul 2012 19:36:00 -0000 [thread overview]
Message-ID: <87394fhbv1.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20120719110518.GE16185@redhat.com> (Gary Benson's message of "Thu, 19 Jul 2012 12:05:18 +0100")
>>>>> "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...
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.
Tom
next prev parent reply other threads:[~2012-07-25 19:36 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 [this message]
2012-07-31 12:12 ` Gary Benson
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=87394fhbv1.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
/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