mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-114099 - Add iOS testbed, plus Makefile target to invoke it. (gh-115930)
This commit is contained in:
parent
bc708c76d2
commit
b33980a2e3
21 changed files with 1195 additions and 126 deletions
|
@ -15,7 +15,9 @@
|
|||
# include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__)
|
||||
# include <TargetConditionals.h>
|
||||
# if TARGET_OS_OSX
|
||||
# include <libproc.h>
|
||||
# include <mach-o/fat.h>
|
||||
# include <mach-o/loader.h>
|
||||
|
@ -26,6 +28,7 @@
|
|||
# include <sys/mman.h>
|
||||
# include <sys/proc.h>
|
||||
# include <sys/sysctl.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
@ -50,7 +53,7 @@
|
|||
# define HAVE_PROCESS_VM_READV 0
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) && TARGET_OS_OSX
|
||||
static void*
|
||||
analyze_macho64(mach_port_t proc_ref, void* base, void* map)
|
||||
{
|
||||
|
@ -373,7 +376,7 @@ read_memory(pid_t pid, void* remote_address, size_t len, void* dst)
|
|||
result += read;
|
||||
} while ((size_t)read != local[0].iov_len);
|
||||
total_bytes_read = result;
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) && TARGET_OS_OSX
|
||||
ssize_t result = -1;
|
||||
kern_return_t kr = mach_vm_read_overwrite(
|
||||
pid_to_task(pid),
|
||||
|
@ -429,7 +432,7 @@ get_py_runtime(pid_t pid)
|
|||
{
|
||||
#if defined(__linux__)
|
||||
return get_py_runtime_linux(pid);
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) && TARGET_OS_OSX
|
||||
return get_py_runtime_macos(pid);
|
||||
#else
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue