Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Use bool in gdbpy_breakpoint_object
@ 2026-10-14 14:07 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2026-10-14 14:07 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes gdbpy_breakpoint_object::is_finish_bp to be of type bool.
---
 gdb/python/py-breakpoint.c       | 2 +-
 gdb/python/py-finishbreakpoint.c | 2 +-
 gdb/python/python-internal.h     | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index b1615db1be3..7b561384230 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -1253,7 +1253,7 @@ gdbpy_breakpoint_created (struct breakpoint *bp)
       newbp->number = bp->number;
       newbp->bp = bp;
       newbp->bp->py_bp_object = newbp;
-      newbp->is_finish_bp = 0;
+      newbp->is_finish_bp = false;
       ++bppy_live;
     }
   else
diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c
index e81a9156ae6..b0634c4caed 100644
--- a/gdb/python/py-finishbreakpoint.c
+++ b/gdb/python/py-finishbreakpoint.c
@@ -325,7 +325,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
     }
 
   self_bpfinish->bp->frame_id = frame_id;
-  self_bpfinish->is_finish_bp = 1;
+  self_bpfinish->is_finish_bp = true;
   self_bpfinish->initiating_frame = get_frame_id (frame);
 
   /* Bind the breakpoint with the current program space.  */
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index 763504dfc46..25c94e18594 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -425,8 +425,8 @@ struct gdbpy_breakpoint_object : public PyObject
      deleted.  */
   struct breakpoint *bp;
 
-  /* 1 is this is a FinishBreakpoint object, 0 otherwise.  */
-  int is_finish_bp;
+  /* True is this is a FinishBreakpoint object, false otherwise.  */
+  bool is_finish_bp;
 };
 
 static_assert (gdb::is_python_allocatable_v<gdbpy_breakpoint_object>);
-- 
2.49.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-14 14:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14 14:07 [PATCH] Use bool in gdbpy_breakpoint_object Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox