Disable the GDB-based test timeout dump in 32 bit.

Bug: 23485091
Change-Id: I46b8ae8d0a37439ca6f2d1030dec8e513b82745f
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 8f2ca30..25bb827 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -495,7 +495,8 @@
   CHECK(!no_sig_chain_) << "A started runtime should have sig chain enabled";
 
   // If a debug host build, disable ptrace restriction for debugging and test timeout thread dump.
-#if defined(__linux__) && !defined(__ANDROID__)
+  // Only 64-bit as prctl() may fail in 32 bit userspace on a 64-bit kernel.
+#if defined(__linux__) && !defined(__ANDROID__) && defined(__x86_64__)
   if (kIsDebugBuild) {
     CHECK_EQ(prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY), 0);
   }
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar
index f45e6f5..6b57f2b 100755
--- a/test/etc/run-test-jar
+++ b/test/etc/run-test-jar
@@ -463,6 +463,9 @@
       if [ `uname` = "Darwin" ]; then
         # Fall back to timeout on Mac.
         TIME_OUT="timeout"
+      elif [ "$ISA" = "x86" ]; then
+        # prctl call may fail in 32-bit on an older (3.2) 64-bit Linux kernel. Fall back to timeout.
+        TIME_OUT="timeout"
       else
         # Check if gdb is available.
         gdb --eval-command="quit" > /dev/null 2>&1