From 3a7b1642281b7bcae9cb622f81a2ad61558f1c20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Fri, 6 Sep 2024 22:55:28 +0200 Subject: [PATCH] darwin: Fix watchOS compilation Simply stub out debug register access on watchOS for now. We will mess with Apple's header directives later. --- gum/backend-darwin/gumprocess-darwin.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gum/backend-darwin/gumprocess-darwin.c b/gum/backend-darwin/gumprocess-darwin.c index f5338d722..deacf14d0 100644 --- a/gum/backend-darwin/gumprocess-darwin.c +++ b/gum/backend-darwin/gumprocess-darwin.c @@ -831,6 +831,13 @@ gum_modify_debug_registers (GumThreadId thread_id, gpointer user_data, GError ** error) { +#ifdef HAVE_WATCHOS + g_set_error (error, + GUM_ERROR, + GUM_ERROR_NOT_SUPPORTED, + "Not supported"); + return FALSE; +#else gboolean success = FALSE; kern_return_t kr; GumDarwinNativeDebugState state; @@ -864,6 +871,7 @@ gum_modify_debug_registers (GumThreadId thread_id, { return success; } +#endif } gboolean