python-gdb.py now checks for "take_gil" function name to check if a
frame tries to acquire the GIL, instead of checking for
"pthread_cond_timedwait" which is specific to Linux and can be a
different condition than the GIL.
(cherry picked from commit
6d0ee60740f2862a878f009671b1aaa75aeb0c2a)
Co-authored-by: Victor Stinner <vstinner@python.org>
--- /dev/null
+Port python-gdb.py to FreeBSD. python-gdb.py now checks for "take_gil"
+function name to check if a frame tries to acquire the GIL, instead of
+checking for "pthread_cond_timedwait" which is specific to Linux and can be
+a different condition than the GIL.
# This assumes the _POSIX_THREADS version of Python/ceval_gil.h:
name = self._gdbframe.name()
if name:
- return 'pthread_cond_timedwait' in name
+ return (name == 'take_gil')
def is_gc_collect(self):
'''Is this frame "collect" within the garbage-collector?'''