Skip to content

Commit 1963e70

Browse files
authored
gh-139275: Fix compilation of Modules/_remote_debugging_module.c when the system doesn't have process_vm_readv (#139307)
1 parent 7ce25ed commit 1963e70

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix compilation problems in ``_remote_debugging_module.c`` when the system
2+
doesn't have ``process_vm_readv``. Patch by Pablo Galindo

Modules/_remote_debugging_module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ _Py_RemoteDebug_GetAsyncioDebugAddress(proc_handle_t* handle)
872872
PyErr_SetString(PyExc_RuntimeError, "Failed to find the AsyncioDebug section in the process.");
873873
_PyErr_ChainExceptions1(exc);
874874
}
875-
#elif defined(__linux__)
875+
#elif defined(__linux__) && HAVE_PROCESS_VM_READV
876876
// On Linux, search for asyncio debug in executable or DLL
877877
address = search_linux_map_for_section(handle, "AsyncioDebug", "python");
878878
if (address == 0) {

Python/remote_debug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ _Py_RemoteDebug_GetPyRuntimeAddress(proc_handle_t* handle)
891891
handle->pid);
892892
_PyErr_ChainExceptions1(exc);
893893
}
894-
#elif defined(__linux__)
894+
#elif defined(__linux__) && HAVE_PROCESS_VM_READV
895895
// On Linux, search for 'python' in executable or DLL
896896
address = search_linux_map_for_section(handle, "PyRuntime", "python");
897897
if (address == 0) {

0 commit comments

Comments
 (0)