Lines Matching refs:Python
1 /* Gdb/Python header for private use by Python module.
27 comes with the Python plugin for GCC. See:
28 https://gcc-python-plugin.readthedocs.org/en/latest/cpychecker.html
58 To work around this, undef _POSIX_C_SOURCE before we include Python.h.
80 /* Request clean size types from Python. */
83 /* Include the Python header files using angle brackets rather than
85 from including our python/python.h header file. */
86 #include <Python.h>
92 /* If Python.h does not define WITH_THREAD, then the various
103 /* Python supplies HAVE_LONG_LONG and some `long long' support when it
107 Starting with python 3.6, support for platforms without long long support
111 [1] https://github.com/python/cpython/issues/72148. */
141 /* PyMem_RawMalloc appeared in Python 3.4. For earlier versions, we can just
195 'const' qualifier before Python 3.4. */
215 'const' qualifier before Python 3.4. */
241 qualifier in Python <= 3.4. Hence, we wrap it in a function to
253 qualifier before Python 3.4. Hence, we wrap it in a function to
264 /* PySys_SetPath was deprecated in Python 3.11. Disable the deprecated
265 code for Python 3.10 and newer. */
269 before Python 3.6. Hence, we wrap it in a function to avoid errors
323 that exists in some newer Python version.) */
378 breakpoint_object_type can't be initialized then set a suitable Python
404 /* Require that BREAKPOINT be a valid breakpoint ID; throw a Python
414 /* Require that BREAKPOINT be a valid breakpoint ID; throw a Python
455 /* Return true if auto-loading Python scripts is enabled.
598 /* Convert Python object OBJ to a program_space pointer. OBJ must be a
606 from all Python files (e.g. gdb/python/py-*.c).
608 Within any Python file, create an instance of this class, passing in
614 (see python.c) to initialize all the Python files within GDB. */
619 Python interpreter. This function will setup any additional Python
621 successful, or return -1 if setup failed, in which case a Python
627 the Python interpreter. This function can cleanup an Python state
629 references to Python objects, these should be released before the
630 Python interpreter is shut down.
660 for a Python file. See the comments on the function types above for
675 /* Run all the Python file initialize functions and return true. If any
700 /* Run all the Python file finalize functions. */
714 functions for a Python file. */
738 /* PyErr_Fetch is deprecated in python 3.12, use PyErr_GetRaisedException
755 /* PyErr_Restore is deprecated in python 3.12, use PyErr_SetRaisedException
762 this object. If the result is NULL a python error occurred, the
768 represented by this object. If the result is NULL a python error
827 /* Called before entering the Python interpreter to install the
828 current language and architecture to be used for Python values.
836 /* Set the ambient Python architecture to GDBARCH and the language
850 /* Return the current gdbarch, as known to the Python layer. This
862 /* The current gdbarch, according to Python. This can be
889 allowing other Python threads to run. No Python APIs may be used
943 'Error occurred in Python' string. Use this in C++ code if we spot
944 something wrong with an object returned from Python code. The prefix
945 string gives the user a hint that the mistake is within Python code,
969 /* Note that these are declared here, and not in python.h with the
1002 /* Use this in a 'catch' block to convert the exception E to a Python
1028 /* Return a Python string (str) object that represents SELF. SELF can be
1062 Python error is set.
1068 Python scripts are now dependent on GDB's internal register numbering.
1085 /* Take DOC, the documentation string for a GDB command defined in Python,
1088 When a command is defined in Python, the documentation string will
1089 usually be indented based on the indentation of the surrounding Python
1095 which looks odd out of the context of the original Python source code.
1106 /* Implement the 'print_insn' hook for Python. Disassemble an instruction
1142 avoid forgetting to register the type. See PR python/32163. */