bpo-36184: Port python-gdb.py to FreeBSD (GH-18873)

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 commit is contained in:
Victor Stinner 2020-03-09 19:35:26 +01:00 committed by GitHub
parent e5ccc94bbb
commit 6d0ee60740
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
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.

View File

@ -1600,7 +1600,7 @@ class Frame(object):
# 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?'''