public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom Tromey <tom@tromey.com>,
	Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 2/9] gdb: add all_breakpoints_safe function
Date: Thu, 27 May 2021 13:58:10 -0400	[thread overview]
Message-ID: <19491c20-8fc5-51c3-ca1e-8423289682f3@polymtl.ca> (raw)
In-Reply-To: <87h7iot6zd.fsf@tromey.com>

On 2021-05-27 1:35 p.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Simon> @@ -3143,9 +3154,7 @@ remove_breakpoints (void)
> Simon>  static void
> Simon>  remove_threaded_breakpoints (struct thread_info *tp, int silent)
> Simon>  {
> Simon> -  struct breakpoint *b, *b_tmp;
> Simon> -
> Simon> -  ALL_BREAKPOINTS_SAFE (b, b_tmp)
> Simon> +  for (breakpoint *b : all_breakpoints ())
> Simon>      {
> Simon>        if (b->thread == tp->global_num && user_breakpoint_p (b))
> Simon>  	{
> 
> I had to go look, but this one is ok to convert to the non-safe
> iterator, as it doesn't modify the collection in the loop.

I don't think it was intentional to use all_breakpoints and not
all_breakpoints_safe here.  I'm leaning towards changing it back to
all_breakpoints_safe, because it's not the goal of this patch to change
the behavior.

Simon

  reply	other threads:[~2021-05-27 17:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 15:35 [PATCH 0/9] Convert breakpoint iteration macros to ranges Simon Marchi
2021-05-27 15:35 ` [PATCH 1/9] gdb: add all_breakpoints function Simon Marchi
2021-05-27 15:35 ` [PATCH 2/9] gdb: add all_breakpoints_safe function Simon Marchi
2021-05-27 17:35   ` Tom Tromey
2021-05-27 17:58     ` Simon Marchi [this message]
2021-05-27 18:15       ` Tom Tromey
2021-05-27 15:35 ` [PATCH 3/9] gdb: add all_tracepoints function Simon Marchi
2021-05-27 15:35 ` [PATCH 4/9] gdb: add breakpoint::locations method Simon Marchi
2021-05-27 15:35 ` [PATCH 5/9] gdb: make bp_locations an std::vector Simon Marchi
2021-05-27 15:35 ` [PATCH 6/9] gdb: add all_bp_locations function Simon Marchi
2021-05-27 15:35 ` [PATCH 7/9] gdb: add all_bp_locations_at_addr function Simon Marchi
2021-05-27 18:04   ` Tom Tromey
2021-05-27 18:13     ` Simon Marchi
2021-05-27 15:35 ` [PATCH 8/9] gdb: remove iterate_over_breakpoints function Simon Marchi
2021-10-21 10:20   ` Tom de Vries
2021-10-21 11:29     ` [PATCH, master + 11][gdb/tui] Fix breakpoint display functionality Tom de Vries
2021-10-21 12:10       ` Tom de Vries
2021-10-21 14:28         ` Simon Marchi
2021-05-27 15:35 ` [PATCH 9/9] gdb: remove iterate_over_bp_locations function Simon Marchi
2021-05-27 18:14 ` [PATCH 0/9] Convert breakpoint iteration macros to ranges Tom Tromey
2021-05-27 18:59   ` Simon Marchi

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=19491c20-8fc5-51c3-ca1e-8423289682f3@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).