Use gdbpy_enter in py-breakpoint.c
authorTom Tromey <tom@tromey.com>
Fri, 7 Jun 2019 22:08:47 +0000 (16:08 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 10 Jun 2019 13:28:02 +0000 (07:28 -0600)
commit25ce02ee7b7667fb7bb882421ff869c080777bee
tree7ba9838fbf8e0cacef0ddae0d51c7f89ab662998
parentcaa429d81a9999699a40b6394c9fb7b258669d54
Use gdbpy_enter in py-breakpoint.c

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-10  Tom Tromey  <tom@tromey.com>

* python/py-breakpoint.c (gdbpy_breakpoint_created)
(gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
gdbpy_enter.
gdb/ChangeLog
gdb/python/py-breakpoint.c