[Lldb-commits] [PATCH] D75696: Correctly detect iOS simulator processes.
Frederic Riss via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 5 18:03:10 PST 2020
friss added inline comments.
================
Comment at: lldb/tools/debugserver/source/MacOSX/MachProcess.mm:601-607
+static bool IsMacOSHost() {
+ static uint32_t g_host_cputype = 0;
+ size_t len = sizeof(uint32_t);
+ if (!g_host_cputype)
+ ::sysctlbyname("hw.cputype", &g_host_cputype, &len, NULL, 0);
+ return g_host_cputype == CPU_TYPE_X86_64 || g_host_cputype == CPU_TYPE_I386;
+}
----------------
Why not use the TARGET_OS_OSX and make the selection below be compile time rather than run time?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75696/new/
https://reviews.llvm.org/D75696
More information about the lldb-commits
mailing list