From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb-patches@sources.redhat.com
Subject: Re: functions that delete breakpoints should not insert bp locations (was: Fix execl.exp sporadic failures)
Date: Thu, 03 Jul 2008 08:48:00 -0000 [thread overview]
Message-ID: <g4i3o9$mhf$1@ger.gmane.org> (raw)
In-Reply-To: <200807030226.54896.pedro@codesourcery.com>
Pedro Alves wrote:
> static void
> -update_global_location_list (void)
> +update_global_location_list (int inserting)
There's no comment for the new parameter. Also, the parameter tells
the function to do, or not do something, so "-ing" sounds awkward.
How about 'should_insert' or 'suppress_insert'?
> {
> struct breakpoint *b;
> struct bp_location **next = &bp_location_chain;
> @@ -7132,7 +7123,11 @@ update_global_location_list (void)
> check_duplicates (b);
> }
>
> - Â if (always_inserted_mode && target_has_execution)
> + Â /* If we get here due to deleting a breakpoint, don't try to insert
> + Â Â locations. Â
This does not tell how 'inserting' is related to 'deleting a breakpoint'.
> This helps cases like: target_detach deleting a
> + Â Â breakpoint before detaching causing all other breakpoints to be
> + Â Â inserted. Â */
I'd suggest to remove this comment, and add a comment before function saying this:
/* If SUPPRESS_INSERT is true, do not insert any breakpoint locations into target,
only remove already-inserted locations that no longer should be inserted.
This behaviour is useful during tear-down -- when the target no longer is
capable of inserting breakpoints, and we're removing internal GDB breakpoints,
we don't want to try inserting other breakpoints into already-gone target. */
As we've already discussed, I think the ideal solution is to mark the target is
'going down' and suppress insertion of breakpoints if the target is in that state.
Your patch, however, should be almost as good, so I don't have any objections.
Thanks for addressing this issue!
- Volodya
next prev parent reply other threads:[~2008-07-03 8:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-03 1:27 Pedro Alves
2008-07-03 8:48 ` Vladimir Prus [this message]
2008-07-03 10:46 ` Pedro Alves
2008-07-07 19:06 ` Daniel Jacobowitz
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='g4i3o9$mhf$1@ger.gmane.org' \
--to=vladimir@codesourcery.com \
--cc=gdb-patches@sources.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