Skip to content

Commit 8514d6e

Browse files
committed
Fix WASI
1 parent 3a4ed23 commit 8514d6e

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Include/internal/pycore_ceval.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,12 @@ void _Py_unset_eval_breaker_bit_all(PyInterpreterState *interp, uintptr_t bit);
347347

348348
PyAPI_FUNC(_PyStackRef) _PyFloat_FromDouble_ConsumeInputs(_PyStackRef left, _PyStackRef right, double value);
349349

350+
#ifndef Py_SUPPORTS_REMOTE_DEBUG
351+
#if (defined(__APPLE__) || defined(MS_WINDOWS) || (defined(__linux__) && HAVE_PROCESS_VM_READV))
352+
# define Py_SUPPORTS_REMOTE_DEBUG 1
353+
#endif
354+
#endif
355+
350356
#ifdef __cplusplus
351357
}
352358
#endif

Python/ceval_gil.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ _PyEval_DisableGIL(PyThreadState *tstate)
11921192
}
11931193
#endif
11941194

1195-
#ifdef Py_REMOTE_DEBUG
1195+
#if defined(Py_REMOTE_DEBUG) && defined(Py_SUPPORTS_REMOTE_DEBUG)
11961196
// Note that this function is inline to avoid creating a PLT entry
11971197
// that would be an easy target for a ROP gadget.
11981198
static inline void run_remote_debugger_script(const char *path)
@@ -1383,7 +1383,7 @@ _Py_HandlePending(PyThreadState *tstate)
13831383
}
13841384
}
13851385

1386-
#ifdef Py_REMOTE_DEBUG
1386+
#if defined(Py_REMOTE_DEBUG) && defined(Py_SUPPORTS_REMOTE_DEBUG)
13871387
const PyConfig *config = _PyInterpreterState_GetConfig(tstate->interp);
13881388
if (config->remote_debug == 1
13891389
&& tstate->remote_debugger_support.debugger_pending_call == 1)

Python/remote_debugging.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,6 @@
6868
# define HAVE_PROCESS_VM_READV 0
6969
#endif
7070

71-
#if (defined(__APPLE__) || defined(MS_WINDOWS) || (defined(__linux__) && HAVE_PROCESS_VM_READV))
72-
# define Py_SUPPORTS_REMOTE_DEBUG 1
73-
#endif
74-
75-
7671
// Define a platform-independent process handle structure
7772
typedef struct {
7873
pid_t pid;

0 commit comments

Comments
 (0)