From b00b30b2981d393743bafe86b5ea37fd2299eccc Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 10 May 2023 11:30:34 -0400 Subject: 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 --- gdb/python/py-breakpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/python') diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c index becb04c..8a306c6 100644 --- a/gdb/python/py-breakpoint.c +++ b/gdb/python/py-breakpoint.c @@ -752,14 +752,14 @@ bppy_get_locations (PyObject *self, void *closure) if (list == nullptr) return nullptr; - for (bp_location *loc : self_bp->bp->locations ()) + for (bp_location &loc : self_bp->bp->locations ()) { gdbpy_ref py_bploc (PyObject_New (py_bploc_t, &breakpoint_location_object_type)); if (py_bploc == nullptr) return nullptr; - bp_location_ref_ptr ref = bp_location_ref_ptr::new_reference (loc); + bp_location_ref_ptr ref = bp_location_ref_ptr::new_reference (&loc); /* The location takes a reference to the owner breakpoint. Decrements when they are de-allocated in bplocpy_dealloc */ Py_INCREF (self); -- cgit v1.1