From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 0/6] Remove some Python safety FIXME comments
Date: Fri, 23 Oct 2026 13:15:45 -0600 [thread overview]
Message-ID: <20261023-python-safety-fixmes-v1-0-055b9e1d237b@tromey.com> (raw)
I realized somewhat belatedly that instead of adding FIXME comments
for Python safety issues, I could write wrapper functions that enforce
the safety approach; and then the goal would shift to eventually
merging the wrappers with the function they wrap.
This series does this. Tested on x86-64 Fedora 40.
Signed-off-by: Tom Tromey <tom@tromey.com>
---
Tom Tromey (6):
Add safe_target_to_connection_object
Add safety wrappers for from_{longest,ulongest}
Add gdbpy_safe_invalid_object_repr
Some symbol-related Python safety fixes
Safe wrappers for some string conversions
Some frame-related Python safety fixes
gdb/python/py-arch.c | 18 ++---------
gdb/python/py-connection.c | 22 ++++++++------
gdb/python/py-frame.c | 71 +++++++++++++++-----------------------------
gdb/python/py-inferior.c | 2 +-
gdb/python/py-ref.h | 7 +++++
gdb/python/py-safety.h | 21 +++++++++++++
gdb/python/py-symbol.c | 64 +++++++++++----------------------------
gdb/python/py-tui.c | 7 +----
gdb/python/py-utils.c | 20 +++++++++++++
gdb/python/py-wrappers.h | 30 +++++++++++++++++++
gdb/python/python-internal.h | 21 +++++++++----
11 files changed, 152 insertions(+), 131 deletions(-)
---
base-commit: 31249660c695a9169ca97590a2c325585740c101
change-id: 20261023-python-safety-fixmes-dfcd48d107b6
Best regards,
--
Tom Tromey <tom@tromey.com>
next reply other threads:[~2026-10-23 19:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 19:15 Tom Tromey [this message]
2026-10-23 19:15 ` [PATCH 1/6] Add safe_target_to_connection_object Tom Tromey
2026-10-23 19:15 ` [PATCH 2/6] Add safety wrappers for from_{longest,ulongest} Tom Tromey
2026-10-23 19:15 ` [PATCH 3/6] Add gdbpy_safe_invalid_object_repr Tom Tromey
2026-10-23 19:15 ` [PATCH 4/6] Some symbol-related Python safety fixes Tom Tromey
2026-10-23 19:15 ` [PATCH 5/6] Safe wrappers for some string conversions Tom Tromey
2026-10-23 19:15 ` [PATCH 6/6] Some frame-related Python safety fixes Tom Tromey
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=20261023-python-safety-fixmes-v1-0-055b9e1d237b@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