File tree Expand file tree Collapse file tree 8 files changed +11
-27
lines changed Expand file tree Collapse file tree 8 files changed +11
-27
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,8 @@ info threads [-gid] [-stopped] [-running] [ID]...
124124
125125* Python API
126126
127+ ** GDB no longer supports Python versions less than 3.4.
128+
127129 ** New class gdb.Color for dealing with colors.
128130
129131 ** New constant gdb.PARAM_COLOR represents color type of a
Original file line number Diff line number Diff line change @@ -533,7 +533,7 @@ more obscure GDB `configure' options are not listed here.
533533 GDB scripting much more powerful than the restricted CLI
534534 scripting language. If your host does not have Python installed,
535535 you can find it on `http://www.python.org/download/'. The oldest
536- version of Python supported by GDB is 3.2 . The optional argument
536+ version of Python supported by GDB is 3.4 . The optional argument
537537 PYTHON is used to find the Python headers and libraries. It can
538538 be either the name of a Python executable, or the name of the
539539 directory in which Python is installed.
Original file line number Diff line number Diff line change @@ -28167,8 +28167,8 @@ int
2816728167main ()
2816828168{
2816928169
28170- #if PY_MAJOR_VERSION != 3
28171- # error "We only support Python 3 "
28170+ #if PY_VERSION_HEX < 0x03040000
28171+ # error "Minimum supported Python version is 3.4 "
2817228172 #endif
2817328173 Py_Initialize ();
2817428174
Original file line number Diff line number Diff line change @@ -740,8 +740,8 @@ AC_DEFUN([AC_TRY_LIBPYTHON],
740740 found_usable_python=no
741741 AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include "Python.h"] ] ,
742742 [ [
743- #if PY_MAJOR_VERSION != 3
744- # error "We only support Python 3 "
743+ #if PY_VERSION_HEX < 0x03040000
744+ # error "Minimum supported Python version is 3.4 "
745745 #endif
746746 Py_Initialize ();
747747 ] ] ) ] ,
Original file line number Diff line number Diff line change @@ -41466,7 +41466,7 @@ libpython is present and found at configure time.) Python makes
4146641466@value{GDBN} scripting much more powerful than the restricted CLI
4146741467scripting language. If your host does not have Python installed, you
4146841468can find it on @url{http://www.python.org/download/}. The oldest version
41469- of Python supported by GDB is 3.0.1 . The optional argument @var{python}
41469+ of Python supported by GDB is 3.4 . The optional argument @var{python}
4147041470is used to find the Python headers and libraries. It can be either
4147141471the name of a Python executable, or the name of the directory in which
4147241472Python is installed.
Original file line number Diff line number Diff line change 1919import threading
2020import traceback
2121from contextlib import contextmanager
22-
23- # Python 3 moved "reload"
24- if sys .version_info >= (3 , 4 ):
25- from importlib import reload
26- else :
27- from imp import reload
22+ from importlib import reload
2823
2924import _gdb
3025
Original file line number Diff line number Diff line change 2929
3030static char *
3131gdbpy_readline_wrapper (FILE * sys_stdin , FILE * sys_stdout ,
32- #if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 4
3332 const char * prompt )
34- #else
35- char * prompt )
36- #endif
3733{
3834 int n ;
3935 const char * p = NULL ;
Original file line number Diff line number Diff line change 8888#include < frameobject.h>
8989#include " py-ref.h"
9090
91+ static_assert (PY_VERSION_HEX >= 0x03040000 );
92+
9193#define Py_TPFLAGS_CHECKTYPES 0
9294
9395/* If Python.h does not define WITH_THREAD, then the various
@@ -135,17 +137,6 @@ typedef unsigned long gdb_py_ulongest;
135137
136138#endif /* HAVE_LONG_LONG */
137139
138- #if PY_VERSION_HEX < 0x03020000
139- typedef long Py_hash_t;
140- #endif
141-
142- /* PyMem_RawMalloc appeared in Python 3.4. For earlier versions, we can just
143- fall back to PyMem_Malloc. */
144-
145- #if PY_VERSION_HEX < 0x03040000
146- #define PyMem_RawMalloc PyMem_Malloc
147- #endif
148-
149140/* A template variable holding the format character (as for
150141 Py_BuildValue) for a given type. */
151142template <typename T>
You can’t perform that action at this time.
0 commit comments