diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2025-04-06 20:39:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-06 20:39:25 (GMT) |
commit | 2067378e6d6e00ba452fb139f9cababf525178dc (patch) | |
tree | b0d2963f7819c35d6a9f9651ea47db833ba5fb5e /Python/remote_debugging.c | |
parent | a693eaa7104f3d2e42a3a1e0347775a3d2757b05 (diff) | |
download | cpython-2067378e6d6e00ba452fb139f9cababf525178dc.zip cpython-2067378e6d6e00ba452fb139f9cababf525178dc.tar.gz cpython-2067378e6d6e00ba452fb139f9cababf525178dc.tar.bz2 |
gh-131591: Handle includes for iOS in remote_debugging.c (#132050)
Diffstat (limited to 'Python/remote_debugging.c')
-rw-r--r-- | Python/remote_debugging.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/Python/remote_debugging.c b/Python/remote_debugging.c index 9b2297b..1b7311f 100644 --- a/Python/remote_debugging.c +++ b/Python/remote_debugging.c @@ -20,24 +20,17 @@ # include <sys/mman.h> #endif -#if defined(__APPLE__) -# include <TargetConditionals.h> -// Older macOS SDKs do not define TARGET_OS_OSX -# if !defined(TARGET_OS_OSX) -# define TARGET_OS_OSX 1 -# endif -# if TARGET_OS_OSX -# include <libproc.h> -# include <mach-o/fat.h> -# include <mach-o/loader.h> -# include <mach-o/nlist.h> -# include <mach/mach.h> -# include <mach/mach_vm.h> -# include <mach/machine.h> -# include <sys/mman.h> -# include <sys/proc.h> -# include <sys/sysctl.h> -# endif +#if defined(__APPLE__) && TARGET_OS_OSX +# include <libproc.h> +# include <mach-o/fat.h> +# include <mach-o/loader.h> +# include <mach-o/nlist.h> +# include <mach/mach.h> +# include <mach/mach_vm.h> +# include <mach/machine.h> +# include <sys/mman.h> +# include <sys/proc.h> +# include <sys/sysctl.h> #endif #ifdef MS_WINDOWS @@ -65,6 +58,8 @@ # define HAVE_PROCESS_VM_READV 0 #endif +#if defined(Py_REMOTE_DEBUG) && defined(Py_SUPPORTS_REMOTE_DEBUG) + // Define a platform-independent process handle structure typedef struct { pid_t pid; @@ -101,8 +96,6 @@ cleanup_proc_handle(proc_handle_t *handle) { handle->pid = 0; } -#if defined(Py_REMOTE_DEBUG) && defined(Py_SUPPORTS_REMOTE_DEBUG) - #if defined(__APPLE__) && TARGET_OS_OSX static uintptr_t return_section_address( |