]> granicus.if.org Git - python/commitdiff
bpo-36974: Fix GDB integration (GH-13665)
authorPetr Viktorin <encukou@gmail.com>
Wed, 29 May 2019 20:45:41 +0000 (22:45 +0200)
committerGitHub <noreply@github.com>
Wed, 29 May 2019 20:45:41 +0000 (22:45 +0200)
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.

Lib/test/test_gdb.py
Tools/gdb/libpython.py

index dbcb5983e9ba1d7902bfc7b753aaff016eeed002..3127e69ca9ba1dc638bbc6898d811614ed6b83d7 100644 (file)
@@ -887,7 +887,7 @@ id(42)
                                           breakpoint='time_gmtime',
                                           cmds_after_breakpoint=['py-bt-full'],
                                           )
-        self.assertIn('#2 <built-in method gmtime', gdb_output)
+        self.assertIn('#1 <built-in method gmtime', gdb_output)
 
     @unittest.skipIf(python_is_optimized(),
                      "Python was compiled with optimizations")
index d744cab7642a75106dcc3b316cac69ce231e35b3..d49546fa9c46dbb207312fd10c2109e7cabfde63 100755 (executable)
@@ -1564,7 +1564,8 @@ class Frame(object):
             return False
 
         if caller in ('_PyCFunction_FastCallDict',
-                      '_PyCFunction_FastCallKeywords'):
+                      '_PyCFunction_FastCallKeywords',
+                      'cfunction_call_varargs'):
             arg_name = 'func'
             # Within that frame:
             #   "func" is the local containing the PyObject* of the