From: Jordan Justen <jordan.l.justen@intel.com>
Date: Tue, 28 Jul 2020 17:12:12 -0700
Subject: linux_process: Only use ptrace for x86 family processors

Although ptrace should be usable for other processor families, for now
simply skipping the paths seems to work. I tested this by skipping the
ptrace paths on x86.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
---
 renderdoc/os/posix/linux/linux_process.cpp | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/renderdoc/os/posix/linux/linux_process.cpp b/renderdoc/os/posix/linux/linux_process.cpp
index fdab3d3..f932e0a 100644
--- a/renderdoc/os/posix/linux/linux_process.cpp
+++ b/renderdoc/os/posix/linux/linux_process.cpp
@@ -55,6 +55,8 @@ extern char **environ;
 #define INITIAL_WAIT_TIME 1
 #define MAX_WAIT_TIME 0xfffff
 
+#define USE_PTRACE (ENABLED(RDOC_X86_FAMILY))
+
 char **GetCurrentEnvironment()
 {
   return environ;
@@ -155,6 +157,8 @@ int GetIdentPort(pid_t childPid)
   return ret;
 }
 
+#if USE_PTRACE
+
 static bool ptrace_scope_ok()
 {
   if(!Linux_PtraceChildProcesses())
@@ -617,6 +621,23 @@ void ResumeProcess(pid_t childPid, uint32_t delaySeconds)
   }
 }
 
+#else // #if USE_PTRACE
+
+bool StopChildAtMain(pid_t childPid)
+{
+  return false;
+}
+
+void StopAtMainInChild()
+{
+}
+
+void ResumeProcess(pid_t childPid, uint32_t delaySeconds)
+{
+}
+
+#endif
+
 // because OSUtility::DebuggerPresent is called often we want it to be
 // cheap. Opening and parsing a file would cause high overhead on each
 // call, so instead we just cache it at startup. This fails in the case
