]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-139275: Fix compilation of Modules/_remote_debugging_module.c when the system...
authorPablo Galindo Salgado <Pablogsal@gmail.com>
Wed, 24 Sep 2025 23:16:44 +0000 (00:16 +0100)
committerGitHub <noreply@github.com>
Wed, 24 Sep 2025 23:16:44 +0000 (00:16 +0100)
Misc/NEWS.d/next/Core_and_Builtins/2025-09-24-17-32-52.gh-issue-139275.novrqf.rst [new file with mode: 0644]
Modules/_remote_debugging_module.c
Python/remote_debug.h

diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2025-09-24-17-32-52.gh-issue-139275.novrqf.rst b/Misc/NEWS.d/next/Core_and_Builtins/2025-09-24-17-32-52.gh-issue-139275.novrqf.rst
new file mode 100644 (file)
index 0000000..8cb4b97
--- /dev/null
@@ -0,0 +1,2 @@
+Fix compilation problems in ``_remote_debugging_module.c`` when the system
+doesn't have ``process_vm_readv``. Patch by Pablo Galindo
index 701f4b0eabdb158188b1dcb760cc7e753e8f372c..5937d4892f550fd06085bc936a6dcce36c7af735 100644 (file)
@@ -872,7 +872,7 @@ _Py_RemoteDebug_GetAsyncioDebugAddress(proc_handle_t* handle)
         PyErr_SetString(PyExc_RuntimeError, "Failed to find the AsyncioDebug section in the process.");
         _PyErr_ChainExceptions1(exc);
     }
-#elif defined(__linux__)
+#elif defined(__linux__) && HAVE_PROCESS_VM_READV
     // On Linux, search for asyncio debug in executable or DLL
     address = search_linux_map_for_section(handle, "AsyncioDebug", "python");
     if (address == 0) {
index d920d9e5b5ff2ceada854b1bf002056533e0444e..e7676013197fa9cfcf15a5905535212c35f2f879 100644 (file)
@@ -891,7 +891,7 @@ _Py_RemoteDebug_GetPyRuntimeAddress(proc_handle_t* handle)
             handle->pid);
         _PyErr_ChainExceptions1(exc);
     }
-#elif defined(__linux__)
+#elif defined(__linux__) && HAVE_PROCESS_VM_READV
     // On Linux, search for 'python' in executable or DLL
     address = search_linux_map_for_section(handle, "PyRuntime", "python");
     if (address == 0) {