btrace: support 32-bit inferior on 64-bit host
[deliverable/binutils-gdb.git] / gdb / x86-linux-nat.c
index c58c01a2bb74eb20f599bff804c8eecf10ffddb7..7f038f01b563e7e810281fcdccd0c42cb433bbdc 100644 (file)
@@ -450,9 +450,11 @@ x86_linux_enable_btrace (struct target_ops *self, ptid_t ptid,
           target_pid_to_str (ptid), safe_strerror (errno));
 
   /* Fill in the size of a pointer in bits.  */
-  gdbarch = target_thread_architecture (ptid);
-  tinfo->ptr_bits = gdbarch_ptr_bit (gdbarch);
-
+  if (tinfo->ptr_bits == 0)
+    {
+      gdbarch = target_thread_architecture (ptid);
+      tinfo->ptr_bits = gdbarch_ptr_bit (gdbarch);
+    }
   return tinfo;
 }
 
This page took 0.027174 seconds and 4 git commands to generate.