From: Eli Zaretskii <eliz@gnu.org>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [4/9] associate bpstat with location
Date: Sat, 08 Sep 2007 11:07:00 -0000 [thread overview]
Message-ID: <u642ls9er.fsf@gnu.org> (raw)
In-Reply-To: <200709080018.25052.vladimir@codesourcery.com> (message from Vladimir Prus on Sat, 8 Sep 2007 00:18:24 +0400)
> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Sat, 8 Sep 2007 00:18:24 +0400
>
> (bpstat_find_breakpoint): Look at bpstat's location's
> owner, not at bpstat->breakpoint_at.
> (bpstat_find_step_resume_breakpoint): Likewise.
> (bpstat_num): Likewise.
> (print_it_typical): Likewise.
> (print_bp_stop_message): Likewise.
> (watchpoint_check): Likewise.
> (bpstat_what): Likewise.
> (bpstat_get_triggered_catchpoints): Likewise.
> (breakpoint_auto_delete): Likewise.
> (delete_breakpoint): Likewise.
A minor stylistic point: could we please avoid the annoying
"Likewise"s? The canonical way of writing a ChangeLog entry for
several functions with an identical change is this:
(bpstat_find_breakpoint, bpstat_find_step_resume_breakpoint)
(bpstat_num, print_it_typical): Look at bpstat's location's
owner, not at bpstat->breakpoint_at.
I'm quite sure the GNU coding standards describe this. (Yes, I know
that our ChangeLog's abuse "Likewise" too much.)
> - b = (*bsp)->breakpoint_at;
> + /* We assume we'll never have several bpstats that
> + correspond to a single breakpoint -- otherwise,
> + this function might return the same number more
> + than once and this will look ugly. */
> + b = (*bsp)->breakpoint_at ? (*bsp)->breakpoint_at->owner : NULL;
Is the assumption in the comment above really valid? I happen to put
several breakpoints on the same line quite a lot (each breakpoint has
a different condition and/or different commands list).
Can we do better, even if it requires to try harder?
> case bp_access_watchpoint:
> if (bs->old_val != NULL)
> {
> - annotate_watchpoint (bs->breakpoint_at->number);
> + annotate_watchpoint (b->number);
Watchpoints also? Did you make corresponding changes in the code that
sets watchpoints?
Thanks.
next prev parent reply other threads:[~2007-09-08 11:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-07 20:18 Vladimir Prus
2007-09-08 11:07 ` Eli Zaretskii [this message]
2007-09-08 11:25 ` Vladimir Prus
2007-09-08 12:16 ` Eli Zaretskii
2007-09-08 14:44 ` Vladimir Prus
2007-09-19 18:27 ` Vladimir Prus
2007-09-19 19:17 ` Eli Zaretskii
2007-09-22 17:50 ` Vladimir Prus
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=u642ls9er.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=vladimir@codesourcery.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