public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug dap/30708] [gdb/dap] DAP support and python 3.4
Date: Wed, 02 Aug 2023 15:22:46 +0000	[thread overview]
Message-ID: <bug-30708-4717-Av8hedE1bG@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30708-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=30708

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Something like this would work:
...
diff --git a/gdb/python/py-dap.c b/gdb/python/py-dap.c
index 52188406982..7289c5ec25c 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 ()
 {
+  /* Dap requires the types module, introduced in python 3.5.  */
+#if PY_VERSION_HEX >= 0x03050000
   interp_factory_register ("dap", [] (const char *name) -> interp *
     {
       return new dap_interp (name);
     });
+#endif
 }
...
and if there's a command to list available interpreters, we can check that one
in allow_dap_tests.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-08-02 15:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31 16:43 [Bug dap/30708] New: " vries at gcc dot gnu.org
2023-07-31 18:08 ` [Bug dap/30708] " tromey at sourceware dot org
2023-07-31 19:21 ` vries at gcc dot gnu.org
2023-08-02 15:22 ` vries at gcc dot gnu.org [this message]
2023-08-02 17:24 ` vries at gcc dot gnu.org
2023-08-02 21:15 ` cvs-commit at gcc dot gnu.org
2023-08-02 21:16 ` vries at gcc dot gnu.org
2023-08-03 16:27 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-30708-4717-Av8hedE1bG@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).