gdb: remove bp_location_pointer_iterator

Remove the bp_location_pointer_iterator layer.  Adjust all users of
breakpoint::locations to use references instead of pointers.

Change-Id: Iceed34f5e0f5790a9cf44736aa658be6d1ba1afa
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
This commit is contained in:
Simon Marchi
2023-05-10 11:30:34 -04:00
parent 20afe380e8
commit b00b30b298
10 changed files with 172 additions and 181 deletions

View File

@@ -12228,22 +12228,20 @@ create_excep_cond_exprs (struct ada_catchpoint *c,
/* Iterate over all the catchpoint's locations, and parse an
expression for each. */
for (bp_location *bl : c->locations ())
for (bp_location &bl : c->locations ())
{
struct ada_catchpoint_location *ada_loc
= (struct ada_catchpoint_location *) bl;
ada_catchpoint_location &ada_loc
= static_cast<ada_catchpoint_location &> (bl);
expression_up exp;
if (!bl->shlib_disabled)
if (!bl.shlib_disabled)
{
const char *s;
s = cond_string.c_str ();
try
{
exp = parse_exp_1 (&s, bl->address,
block_for_pc (bl->address),
0);
exp = parse_exp_1 (&s, bl.address, block_for_pc (bl.address), 0);
}
catch (const gdb_exception_error &e)
{
@@ -12253,7 +12251,7 @@ create_excep_cond_exprs (struct ada_catchpoint *c,
}
}
ada_loc->excep_cond_expr = std::move (exp);
ada_loc.excep_cond_expr = std::move (exp);
}
}