gdb: add all_breakpoints 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)
commit43892fdfa1aecb67d4830c47c9a40b0d74ed4c47
treeb16c8c8ff8427ddc817d539da3c43b0e463eafd9
parentbdef5723041368f3e264ac641360950c936b7ce4
gdb: add all_breakpoints function

Introduce the all_breakpoints function, which returns a range that can
be used to iterate on breakpoints.  Replace all uses of the
ALL_BREAKPOINTS macro with this.

In one instance, I could replace the breakpoint iteration with a call to
get_breakpoint.

gdb/ChangeLog:

* breakpoint.c (ALL_BREAKPOINTS): Remove, replace all uses with
all_breakpoints.
(breakpoint_iterator): New.
(breakpoint_range): New.
(all_breakpoints): New.

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