From: Joel Brobecker <brobecker@adacore.com>
To: Thiago Jung Bauermann <bauerman@br.ibm.com>
Cc: gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [RFA] Refactor breakpoint_re_set_one
Date: Mon, 28 Mar 2011 20:08:00 -0000 [thread overview]
Message-ID: <20110328184647.GD3670@adacore.com> (raw)
In-Reply-To: <1301322874.2433.0.camel@hactar>
> 2011-03-27 Thiago Jung Bauermann <bauerman@br.ibm.com>
>
> * breakpoint.c (breakpoint_re_set_one): Factor out breakpoint-resetting
> code from here ...
> (reset_breakpoint): ... to here ...
> (addr_string_to_sals): ... and here.
I didn't really verify line by line that you just extracted out
the code without actually changing something, but I think we can
trust your copy/paste tool :-).
No real issue on my end of things (just a few little nits).
But I'm no longer a specialist of this area, so I'd wait a little
to see if anyone else might have some comments (say, until the
end of the week?).
My comments below:
> +/* Find the SaL locations corresponding to the given addr_string. */
By convention `addr_string' should be capitalized. It's one of these
things I really wonder why we do it, but anyways...
> + /* For pending breakpoints, it's expected that parsing will
> + fail until the right shared library is loaded. User has
> + already told to create pending breakpoints and don't need
^^^^ doesn't
> + extra messages. If breakpoint is in bp_shlib_disabled
> + state, then user already saw the message about that
> + breakpoint being disabled, and don't want to see more
^^^^^ doesn't
> + errors. */
> +/* Reset a hardware or software breakpoint. */
> +
> +static void
> +reset_breakpoint (struct breakpoint *b)
My only comment is that `reset' is a little ambiguous, but maybe
that's just me. I often think of "reset" as set back to original
value. I like the use of `re_set' in breakpoint_re_set_one, so
what do you think of doing the same here? Also, a more descriptive
description of the function would be useful, IMO.
--
Joel
next prev parent reply other threads:[~2011-03-28 18:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-28 15:18 Thiago Jung Bauermann
2011-03-28 20:08 ` Joel Brobecker [this message]
2011-03-28 20:24 ` Pedro Alves
2011-03-29 1:40 ` Thiago Jung Bauermann
2011-03-29 1:55 ` Joel Brobecker
2011-03-29 12:36 ` Ulrich Weigand
2011-03-31 14:46 ` Thiago Jung Bauermann
2011-03-31 14:37 ` [commit] Fix uninitialized warning (Re: [RFA] Refactor breakpoint_re_set_one) Ulrich Weigand
2011-03-31 15:03 ` Thiago Jung Bauermann
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=20110328184647.GD3670@adacore.com \
--to=brobecker@adacore.com \
--cc=bauerman@br.ibm.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