]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Restrict panic's int3 assembly to x86(_64).
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:35 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:35 +0000 (11:23 -0700)
Panic could also be used for iOS.

open-vm-tools/lib/panic/panic.c

index 2a7b43533a1a0a556c26ad2e8d6975db1fc95e9a..fe6795b8fce0a36618cd8bdd7666f881a9f122ec 100644 (file)
@@ -293,7 +293,7 @@ Panic_BreakOnPanic(void)
       Warning("Panic: breaking into debugger\n");
       DebugBreak();
    }
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) && (defined(__x86_64__) || defined(__i386__))
    if (Panic_GetBreakOnPanic()) {
       Warning("Panic: breaking into debugger\n");
       __asm__ __volatile__ ("int3");
@@ -403,7 +403,7 @@ Panic_GetBreakOnPanic(void)
    case PanicBreakAction_IfDebuggerAttached:
 #if defined(_WIN32)
       shouldBreak = IsDebuggerPresent();
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) && (defined(__x86_64__) || defined(__i386__))
       {
          /*
           * https://developer.apple.com/library/content/qa/qa1361/