Skip to content

Commit 25cc486

Browse files
committed
Add error code to exception when failing to write memory on macOS
1 parent 8db68e3 commit 25cc486

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/remote_debugging.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ write_memory(proc_handle_t *handle, uintptr_t remote_address, size_t len, const
648648
PyErr_SetString(PyExc_PermissionError, "Invalid argument to mach_vm_write");
649649
break;
650650
default:
651-
PyErr_SetString(PyExc_RuntimeError, "Unknown error writing memory");
651+
PyErr_Format(PyExc_RuntimeError, "Unknown error writing memory: %d", (int)kr);
652652
}
653653
return -1;
654654
}

0 commit comments

Comments
 (0)