[Lldb-commits] [PATCH] D82491: [Apple Silicon] Initial support for Rosetta
Eric Christopher via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 24 13:34:45 PDT 2020
echristo added inline comments.
================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:20
#include <sys/stat.h>
+#include <sys/sysctl.h>
#include <sys/types.h>
----------------
echristo wrote:
> This is problematic in that sys/sysctl is deprecated on linux (causing warnings/Werror failures).
I'm going to #ifdef this only in for apple at the moment matching the use below.
================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:3444
+ size_t bufsize = sizeof(processInfo);
+ if (sysctl(mib, (unsigned)(sizeof(mib)/sizeof(int)), &processInfo,
+ &bufsize, NULL, 0) == 0 && bufsize > 0) {
----------------
JDevlieghere wrote:
> The `sysctl` call seems like something that would fit into host, we already have a bunch of those in `Host.mm`. Should we create a function there that returns whether a given pid runs under Rosetta?
Agreed. That seems much cleaner.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82491/new/
https://reviews.llvm.org/D82491
More information about the lldb-commits
mailing list