Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@elta.co.il>
To: Jeff Johnston <jjohnstn@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA]: breakpoint.c patch (prelude to pending breakpoint support)
Date: Thu, 11 Dec 2003 06:00:00 -0000	[thread overview]
Message-ID: <u8yljvqnd.fsf@elta.co.il> (raw)
In-Reply-To: <3FD7C458.2080404@redhat.com> (message from Jeff Johnston on Wed, 10 Dec 2003 20:11:52 -0500)

> Date: Wed, 10 Dec 2003 20:11:52 -0500
> From: Jeff Johnston <jjohnstn@redhat.com>
> 
> Ok to commit?

I have 2 very minor comments.  The first one is about the ChangeLog
entries:

> 2003-12-10  Jeff Johnston  <jjohnstn@redhat.com>
> 
>     * breakpoint.c (breakpoint_enabled): New function to test whether breakpoint is
>     active and enabled.

Is this line really that long, or did your mailer mess it up?  If the
former, it needs to be reformatted.

>     ( insert_bp_location, insert_breakpoints): Call new function to test
>     for enabled breakpoint.
>     (remove_breakpoint, breakpoint_here_p): Ditto.
>     (breakpoint_thread_match): Ditto.
>     (bpstat_should_step, bpstat_have_active_hw_watchpoints): Ditto.
>     (disable_breakpoints_in_shlibs): Ditto.
>     (hw_watchpoint_used_count): Ditto.
>     (disable_watchpoints_before_interactive_call_start): Ditto.
>     (breakpoint_re_set_one): Ditto.

Instead of the long series of "(func): Ditto." kind of entries, it's
better to make a single multi-line entry, like this:

    (remove_breakpoint, breakpoint_here_p, breakpoint_thread_match)
    (bpstat_should_step, bpstat_have_active_hw_watchpoints)
    (disable_breakpoints_in_shlibs, hw_watchpoint_used_count)
    (disable_watchpoints_before_interactive_call_start)
    (breakpoint_re_set_one): Ditto.

(Note how every line ends with a right paren: it's important for
Emacs to highlight the function names correctly.)

Also, please make sure each line of the ChangeLog entry begins with a
literal TAB character.

The second comment is about this hunk of changes:

> @@ -2574,9 +2581,7 @@ bpstat_stop_status (CORE_ADDR *pc, int n
>  
>    ALL_BREAKPOINTS_SAFE (b, temp)
>    {
> -    if (b->enable_state == bp_disabled
> -	|| b->enable_state == bp_shlib_disabled
> -	|| b->enable_state == bp_call_disabled)
> +    if (!breakpoint_enabled (b) && b->enable_state != bp_permanent)
>        continue;

Bother.  Is it really wise to replace an explicit check of equality to
several bp_* constants with "!= bp_permanent"?  Are we sure that any
non-bp_permanent breakpoint should pass this test, even if in the
future additional bp_* constants will be introduced that aren't there
now?

Thanks.


  parent reply	other threads:[~2003-12-11  6:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-11  1:11 Jeff Johnston
2003-12-11  4:09 ` Daniel Jacobowitz
2003-12-11  6:00 ` Eli Zaretskii [this message]
2003-12-11 14:21   ` Daniel Jacobowitz
2003-12-11 14:34     ` Eli Zaretskii
2003-12-12 19:05       ` J. Johnston
2003-12-11 20:36     ` Jim Blandy
2003-12-12  2:51       ` Daniel Jacobowitz
2003-12-12  6:18       ` Jim Blandy
2003-12-11 16:32   ` J. Johnston
2003-12-11 17:20     ` Eli Zaretskii
2003-12-11 19:33       ` J. Johnston
2003-12-11 19:50         ` Daniel Jacobowitz
2003-12-12 16:58         ` Eli Zaretskii

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=u8yljvqnd.fsf@elta.co.il \
    --to=eliz@elta.co.il \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jjohnstn@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