From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] gdb/python: fix use of frame_info_ptr within pending_frame_object
Date: Fri, 15 May 2026 11:22:02 -0600 [thread overview]
Message-ID: <87pl2wh9l1.fsf@tromey.com> (raw)
In-Reply-To: <cc0b6f8646c10a9e50b5980635f3dd605764cc61.1778839043.git.aburgess@redhat.com> (Andrew Burgess's message of "Fri, 15 May 2026 11:00:47 +0100")
>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
Andrew> The problem with frame_info_ptr is that its constructor registers the
Andrew> new frame_info_ptr with the global frame_list. It is by this
Andrew> registration that invalidation of frame_info_ptr objects is performed.
Thanks for finding & fixing this.
Andrew> + frame_info_ptr frame (*pending_frame->frame_info);
Andrew> return PyUnicode_FromFormat ("<%s frame #%d, saved_regs=(%s)>",
Andrew> gdbpy_py_obj_tp_name (self),
Andrew> frame_relative_level (frame),
This could be 'const frame_info_ptr &frame (...)' and avoid some updates
to globals, since no copy will be done.
I didn't look closely but perhaps other spots could do the same.
It may not matter so if you want to ignore this that's fine by me.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
next prev parent reply other threads:[~2026-05-15 17:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 10:00 [PATCH 0/3] Use C++ type traits check to catch bugs in Python API Andrew Burgess
2026-05-15 10:00 ` [PATCH 1/3] gdb/python: add type traits check for all PyObject sub-classes Andrew Burgess
2026-05-15 17:10 ` Tom Tromey
2026-05-16 12:27 ` Andrew Burgess
2026-05-15 10:00 ` [PATCH 2/3] gdb/python: fix use of frame_info_ptr within pending_frame_object Andrew Burgess
2026-05-15 17:22 ` Tom Tromey [this message]
2026-05-16 12:28 ` Andrew Burgess
2026-05-15 10:00 ` [PATCH 3/3] gdb/testsuite: add a test to check for Python traits static_assert Andrew Burgess
2026-05-15 17:31 ` Tom Tromey
2026-05-16 12:29 ` Andrew Burgess
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=87pl2wh9l1.fsf@tromey.com \
--to=tom@tromey.com \
--cc=aburgess@redhat.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