]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: add all_breakpoints_safe function
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 27 May 2021 18:58:36 +0000 (14:58 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 27 May 2021 18:58:36 +0000 (14:58 -0400)
commit1428b37afbd8a5199e1c4b2a53ef8700208a12d4
treeca93ce7681b1b3436a3815f5052dae3e7d6caed3
parent43892fdfa1aecb67d4830c47c9a40b0d74ed4c47
gdb: add all_breakpoints_safe function

Same as the previous patch, but intended to replace the
ALL_BREAKPOINTS_SAFE macro, which allows deleting the current breakpoint
while iterating.  The new range type simply wraps the range added by the
previous patch with basic_safe_range.

I didn't remove the ALL_BREAKPOINTS_SAFE macro, because there is one
spot where it's more tricky to remove, in the
check_longjmp_breakpoint_for_call_dummy function.  More thought it
needed for this one.

gdb/ChangeLog:

* breakpoint.c (breakpoint_safe_range): New.
(all_breakpoints_safe): New.  Use instead of
ALL_BREAKPOINTS_SAFE where possible.

Change-Id: Ifccab29f135e1f85700e3697ed60f0b643c7682f
gdb/ChangeLog
gdb/breakpoint.c