Skip to content
Commit fc21e0f0 authored by Tom de Vries's avatar Tom de Vries
Browse files

[gdb/dap] Fix dap for python < 3.8



With any gdb.dap test and python 3.6 I run into:
...
Error occurred in Python: 'code' object has no attribute 'co_posonlyargcount'
ERROR: eof reading json header
...

The attribute is not supported before python 3.8, which introduced the
"Positional−only Parameters" concept.

Fix this by using try/except AttributeError.

Tested on x86_64-linux:
- openSUSE Leap 15.4 with python 3.6, and
- openSUSE Tumbleweed with python 3.11.5.

Approved-By: default avatarTom Tromey <tom@tromey.com>
parent d5fa6e8c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment