diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-05-09 10:23:44 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-05-25 08:46:23 -0400 |
commit | 9dc1523b573cc065d6124e3127009c1d7cb8317b (patch) | |
tree | 93c5b1823d9158cdfd80e06baa3e605e9d4457f6 /gdb/python/py-block.c | |
parent | 5e632eca05f38ea7229f103e0636e02c6dfcd9fa (diff) | |
download | binutils-9dc1523b573cc065d6124e3127009c1d7cb8317b.zip binutils-9dc1523b573cc065d6124e3127009c1d7cb8317b.tar.gz binutils-9dc1523b573cc065d6124e3127009c1d7cb8317b.tar.bz2 |
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>
Diffstat (limited to 'gdb/python/py-block.c')
0 files changed, 0 insertions, 0 deletions