Skip to content

Commit fecb75c

Browse files
authored
bpo-36974: Fix GDB integration (GH-13665)
As it changes the way functions are called, the PEP 590 implementation skipped the functions that the GDB integration is looking for (by name) to find function calls. Looking for the new helper `cfunction_call_varargs` hopefully fixes the tests, and thus buildbots. The changed frame nuber in test_gdb is due to there being fewer C calls when calling a built-in method.
1 parent e70bfa9 commit fecb75c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Lib/test/test_gdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ def test_pycfunction(self):
887887
breakpoint='time_gmtime',
888888
cmds_after_breakpoint=['py-bt-full'],
889889
)
890-
self.assertIn('#2 <built-in method gmtime', gdb_output)
890+
self.assertIn('#1 <built-in method gmtime', gdb_output)
891891

892892
@unittest.skipIf(python_is_optimized(),
893893
"Python was compiled with optimizations")

Tools/gdb/libpython.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,8 @@ def is_other_python_frame(self):
15641564
return False
15651565

15661566
if caller in ('_PyCFunction_FastCallDict',
1567-
'_PyCFunction_FastCallKeywords'):
1567+
'_PyCFunction_FastCallKeywords',
1568+
'cfunction_call_varargs'):
15681569
arg_name = 'func'
15691570
# Within that frame:
15701571
# "func" is the local containing the PyObject* of the

0 commit comments

Comments
 (0)