This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Use gdbpy_enter in py-breakpoint.c
- From: Kevin Buettner <kevinb at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 8 Jun 2019 13:05:52 -0700
- Subject: Re: [PATCH] Use gdbpy_enter in py-breakpoint.c
- References: <20190607221026.15939-1-tom@tromey.com>
On Fri, 7 Jun 2019 16:10:26 -0600
Tom Tromey <tom@tromey.com> wrote:
> A few spots in py-breakpoint.c acquire the GIL manually. However,
> because these spots generate events, and because events are expected
> to be arbitrary gdb-flavored Python code, it's important to use
> gdbpy_enter instead, in order to ensure that the other gdb-related
> Python globals are set correctly.
>
> This patch makes this change. Tested on x86-64 Fedora 29.
>
> gdb/ChangeLog
> 2019-06-07 Tom Tromey <tom@tromey.com>
>
> * python/py-breakpoint.c (gdbpy_breakpoint_created)
> (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
> gdbpy_enter.
LGTM.
Kevin