aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2023-05-09 10:08:51 -0400
committerSimon Marchi <simon.marchi@efficios.com>2023-05-25 09:52:22 -0400
commita1decfc1df541de75e7506cb6ac7fbdd8648fbf6 (patch)
treed5fd8ef869ee0baf73c639c949242c481f2b8c68 /gdb/python
parent410f4d7a76fec676ad1f22beafbdbe40c2f700de (diff)
downloadgdb-a1decfc1df541de75e7506cb6ac7fbdd8648fbf6.zip
gdb-a1decfc1df541de75e7506cb6ac7fbdd8648fbf6.tar.gz
gdb-a1decfc1df541de75e7506cb6ac7fbdd8648fbf6.tar.bz2
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>
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-breakpoint.c4
-rw-r--r--gdb/python/py-finishbreakpoint.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index 8a306c6..d11fc64 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -1035,8 +1035,8 @@ gdbpy_breakpoints (PyObject *self, PyObject *args)
/* If build_bp_list returns false, it signals an error condition. In that
case abandon building the list and return nullptr. */
- for (breakpoint *bp : all_breakpoints ())
- if (!build_bp_list (bp, list.get ()))
+ for (breakpoint &bp : all_breakpoints ())
+ if (!build_bp_list (&bp, list.get ()))
return nullptr;
return PyList_AsTuple (list.get ());
diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c
index bb4591e..b71e5fa 100644
--- a/gdb/python/py-finishbreakpoint.c
+++ b/gdb/python/py-finishbreakpoint.c
@@ -416,9 +416,9 @@ bpfinishpy_handle_stop (struct bpstat *bs, int print_frame)
{
gdbpy_enter enter_py;
- for (breakpoint *bp : all_breakpoints_safe ())
+ for (breakpoint &bp : all_breakpoints_safe ())
bpfinishpy_detect_out_scope_cb
- (bp, bs == NULL ? NULL : bs->breakpoint_at, true);
+ (&bp, bs == NULL ? NULL : bs->breakpoint_at, true);
}
/* Attached to `exit' notifications, triggers all the necessary out of
@@ -429,8 +429,8 @@ bpfinishpy_handle_exit (struct inferior *inf)
{
gdbpy_enter enter_py (target_gdbarch ());
- for (breakpoint *bp : all_breakpoints_safe ())
- bpfinishpy_detect_out_scope_cb (bp, nullptr, true);
+ for (breakpoint &bp : all_breakpoints_safe ())
+ bpfinishpy_detect_out_scope_cb (&bp, nullptr, true);
}
/* Initialize the Python finish breakpoint code. */