gdb: remove breakpoint_pointer_iterator

Remove the breakpoint_pointer_iterator layer.  Adjust all users of
all_breakpoints and all_tracepoints to use references instead of
pointers.

Change-Id: I376826f812117cee1e6b199c384a10376973af5d
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
This commit is contained in:
Simon Marchi
2023-05-09 10:08:51 -04:00
parent 410f4d7a76
commit a1decfc1df
11 changed files with 360 additions and 366 deletions

View File

@@ -91,20 +91,20 @@ solib_catchpoint::breakpoint_hit (const struct bp_location *bl,
if (ws.kind () == TARGET_WAITKIND_LOADED)
return 1;
for (breakpoint *other : all_breakpoints ())
for (breakpoint &other : all_breakpoints ())
{
if (other == bl->owner)
if (&other == bl->owner)
continue;
if (other->type != bp_shlib_event)
if (other.type != bp_shlib_event)
continue;
if (pspace != NULL && other->pspace != pspace)
if (pspace != NULL && other.pspace != pspace)
continue;
for (bp_location &other_bl : other->locations ())
for (bp_location &other_bl : other.locations ())
{
if (other->breakpoint_hit (&other_bl, aspace, bp_addr, ws))
if (other.breakpoint_hit (&other_bl, aspace, bp_addr, ws))
return 1;
}
}