[debugserver] Call posix_spawnattr_setarchpref_np throught the fn ptr.
authorJonas Devlieghere <jonas@devlieghere.com>
Sun, 6 Dec 2020 01:35:32 +0000 (17:35 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Sun, 6 Dec 2020 01:38:42 +0000 (17:38 -0800)
Fourth time is the charm? Of course all of these issues don't show up
when the function is available...

lldb/tools/debugserver/source/MacOSX/MachProcess.mm

index 386c5e4..7176a47 100644 (file)
@@ -3279,8 +3279,8 @@ pid_t MachProcess::PosixSpawnChildForPTraceDebugging(
           (posix_spawnattr_setarchpref_np_t)dlsym(
               RTLD_DEFAULT, "posix_spawnattr_setarchpref_np");
       if (posix_spawnattr_setarchpref_np_fn) {
-        err.SetError((*posix_spawnattr_setarchpref_np)(&attr, 1, &cpu_type,
-                                                       &cpu_subtype, &ocount));
+        err.SetError((*posix_spawnattr_setarchpref_np_fn)(
+            &attr, 1, &cpu_type, &cpu_subtype, &ocount));
         slice_preference_set = err.Success();
         if (err.Fail() || DNBLogCheckLogBit(LOG_PROCESS))
           err.LogThreaded(