]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Use run_on_main_thread in gdb.post_event
authorTom Tromey <tom@tromey.com>
Sat, 8 Jun 2019 14:15:57 +0000 (08:15 -0600)
committerTom Tromey <tom@tromey.com>
Sun, 10 Nov 2019 17:44:50 +0000 (10:44 -0700)
commite4efbf384e4745bf474c2ea05c21011545dc75a8
treee7f6b0435662283851f75b9297de88023fee2907
parent9ca863ae09eb744705b7bd0fec55305b648799bf
Use run_on_main_thread in gdb.post_event

This changes gdb.post_event to use the new run_on_main_thread
function.  This is somewhat tricky because the Python GIL must be held
while manipulating reference counts.

2019-10-19  Tom Tromey  <tom@tromey.com>

* python/python.c (class gdbpy_gil): New.
(struct gdbpy_event): Add constructor, destructor, operator().
(gdbpy_post_event): Use run_on_main_thread.
(gdbpy_initialize_events): Remove.
(do_start_initialization): Update.

Change-Id: Ie4431e60f328dae48bd96b6c6a8e875e70bda1de
gdb/ChangeLog
gdb/python/python.c