mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
gdb: add breakpoint "has locations" methods
Add three convenience methods to struct breakpoint: - has_locations: returns true if the breakpoint has at least one location - has_single_location: returns true if the breakpoint has exactly one location - has_multiple_locations: returns true if the breakpoint has more than one location A subsequent patch changes the list of breakpoints to be an intrusive_list, so all these spots would need to change. But in any case, I think that this: if (b->has_multiple_locations ()) conveys the intention better than: if (b->loc != nullptr && b->loc->next != nullptr) Change-Id: Ib18c3605fd35d425ef9df82cb7aacff1606c6747 Reviewed-By: Andrew Burgess <aburgess@redhat.com>
This commit is contained in:
@@ -12218,7 +12218,7 @@ create_excep_cond_exprs (struct ada_catchpoint *c,
|
||||
return;
|
||||
|
||||
/* Same if there are no locations... */
|
||||
if (c->loc == NULL)
|
||||
if (!c->has_locations ())
|
||||
return;
|
||||
|
||||
/* Compute the condition expression in text form, from the specific
|
||||
|
||||
Reference in New Issue
Block a user