[ was: Re: [PATCH] Initial implementation of Debugger Adapter Protocol ] On 1/4/23 13:27, Tom de Vries wrote: > On 1/4/23 12:59, Tom de Vries via Gdb-patches wrote: >> On 1/3/23 15:14, Tom Tromey wrote: >>> Tom> /home/vries/gdb_versions/devel/src/gdb/python/py-dap.c: In member >>> Tom> function ‘virtual void dap_interp::init(bool)’: >>> Tom> /home/vries/gdb_versions/devel/src/gdb/python/py-dap.c:83:27: >>> error: >>> Tom> ‘PyObject_CallNoArgs’ was not declared in this scope >>> Tom>    gdbpy_ref<> result_obj (PyObject_CallNoArgs (func.get ())); >>> Tom>                            ^~~~~~~~~~~~~~~~~~~ >>> Tom> /home/vries/gdb_versions/devel/src/gdb/python/py-dap.c:83:27: note: >>> Tom> suggested alternative: ‘_PyObject_CallNoArg’ >>> Tom>    gdbpy_ref<> result_obj (PyObject_CallNoArgs (func.get ())); >>> Tom>                            ^~~~~~~~~~~~~~~~~~~ >>> Tom>                            _PyObject_CallNoArg >>> Tom> ... >>> >>> Sorry about that.  I'm going to apply the appended, which should fix the >>> problem. >> >> That fixed the build problem, thanks for that. >> >> Now I'm running into an error in the testsuite: >> ... >> ERROR: eof reading json header >>      while executing >> "error "eof reading json header"" >>      invoked from within >> "expect { >> -i exp19 -timeout 10 >>          -re "^Content-Length: (\[0-9\]+)\r\n" { >>              set length $expect_out(1,string) >>              exp_continue >>          } >>          -re "^(\[^\r\n\]+)..." >>      ("uplevel" body line 1) >>      invoked from within >> "uplevel $body" NONE eof reading json header >> UNRESOLVED: gdb.dap/basic-dap.exp: startup - initialize >> ... > > Hmm, that seems to be because: > ... > (gdb) > #5  0x0000000000a59a7c in gdbpy_handle_exception () >     at /home/vries/gdb_versions/devel/src/gdb/python/py-utils.c:396 > 396             error (_("Error occurred in Python: %s"), msg.get ()); > (gdb) p msg.get () > $1 = 0x2b91d10 "module 'queue' has no attribute 'SimpleQueue'" > ... > > That's new in python 3.7, and I have: > ... > $ ldd ./gdb | grep python >         libpython3.6m.so.1.0 => /usr/lib64/libpython3.6m.so.1.0 > (0x00007f93ed624000) > ... Fixed by attached commit, any comments? Thanks, - Tom