From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH] Use bool in gdbpy_breakpoint_object
Date: Wed, 14 Oct 2026 08:07:12 -0600 [thread overview]
Message-ID: <20261014140712.840201-1-tom@tromey.com> (raw)
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
reply other threads:[~2026-10-14 14:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261014140712.840201-1-tom@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox