Skip to content

Commit 8db68e3

Browse files
committed
Mark (read|write)_memory unreachable on platforms w/o remote debugging
1 parent 0905105 commit 8db68e3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Python/remote_debugging.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -592,10 +592,7 @@ read_memory(proc_handle_t *handle, uint64_t remote_address, size_t len, void* ds
592592
}
593593
return 0;
594594
#else
595-
PyErr_SetString(
596-
PyExc_RuntimeError,
597-
"Memory reading is not supported on this platform");
598-
return -1;
595+
Py_UNREACHABLE();
599596
#endif
600597
}
601598

@@ -657,8 +654,7 @@ write_memory(proc_handle_t *handle, uintptr_t remote_address, size_t len, const
657654
}
658655
return 0;
659656
#else
660-
PyErr_Format(PyExc_RuntimeError, "Writing memory is not supported on this platform");
661-
return -1;
657+
Py_UNREACHABLE();
662658
#endif
663659
}
664660

0 commit comments

Comments
 (0)