diff options
author | Tom de Vries <tdevries@suse.de> | 2023-08-02 23:14:58 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-08-02 23:14:58 +0200 |
commit | 3c3e54d7b5f7da003292710fe810e670d45832d8 (patch) | |
tree | b2315895e9f8e9e9d82f830766126f71f60438bb /gdb/python/py-dap.c | |
parent | 86bb2d76c901a558e5b2dd29df95874ce6e78dae (diff) | |
download | binutils-3c3e54d7b5f7da003292710fe810e670d45832d8.zip binutils-3c3e54d7b5f7da003292710fe810e670d45832d8.tar.gz binutils-3c3e54d7b5f7da003292710fe810e670d45832d8.tar.bz2 |
[gdb/dap] Disable DAP for python <= 3.5
DAP requires python module typing, which is supported starting python 3.5.
Make this formal by:
- disabling the dap interpreter for python version < 3.5
- returning 0 in allow_dap_tests for python version < 3.5
Approved-By: Tom Tromey <tom@tromey.com>
PR dap/30708
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30708
Diffstat (limited to 'gdb/python/py-dap.c')
-rw-r--r-- | gdb/python/py-dap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/python/py-dap.c b/gdb/python/py-dap.c index 5218840..3444ecc 100644 --- a/gdb/python/py-dap.c +++ b/gdb/python/py-dap.c @@ -91,8 +91,11 @@ void _initialize_py_interp (); void _initialize_py_interp () { + /* The dap code uses module typing, available starting python 3.5. */ +#if PY_VERSION_HEX >= 0x03050000 interp_factory_register ("dap", [] (const char *name) -> interp * { return new dap_interp (name); }); +#endif } |