Pass ptid to aarch64_linux_get_debug_reg_capacity
authorYao Qi <yao.qi@linaro.org>
Thu, 9 Jul 2015 11:55:45 +0000 (12:55 +0100)
committerYao Qi <yao.qi@linaro.org>
Thu, 9 Jul 2015 11:55:45 +0000 (12:55 +0100)
This patch is to pass ptid to aarch64_linux_get_debug_reg_capacity,
and stop using global variable inferior_ptid.

gdb:

2015-07-09  Yao Qi  <yao.qi@linaro.org>

* aarch64-linux-nat.c (aarch64_linux_get_debug_reg_capacity): Add
argument ptid.  Update comments.  Caller update.

gdb/ChangeLog
gdb/aarch64-linux-nat.c

index 2e8de896aec587252cfb1fe7d860e24d0ad9b7bf..c7d0ddc0505464c1c3a9ee6a13cbfa61ed949739 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-09  Yao Qi  <yao.qi@linaro.org>
+
+       * aarch64-linux-nat.c (aarch64_linux_get_debug_reg_capacity): Add
+       argument ptid.  Update comments.  Caller update.
+
 2015-07-09  Markus Metzger  <markus.t.metzger@intel.com>
 
        * btrace.c (pt_print_packet): Print stop, vmcs, tma, mtc, cyc, and
index d48624fc723b0c383da2e34e28c1862e4100ec92..c4ddad5aea4d3d5f98b5bb5457cfa30fe52118ca 100644 (file)
@@ -838,16 +838,17 @@ ps_get_thread_area (const struct ps_prochandle *ph,
 }
 \f
 
-/* Get the hardware debug register capacity information.  */
+/* Get the hardware debug register capacity information from the
+   inferior represented by PTID.  */
 
 static void
-aarch64_linux_get_debug_reg_capacity (void)
+aarch64_linux_get_debug_reg_capacity (ptid_t ptid)
 {
   int tid;
   struct iovec iov;
   struct user_hwdebug_state dreg_state;
 
-  tid = get_thread_id (inferior_ptid);
+  tid = get_thread_id (ptid);
   iov.iov_base = &dreg_state;
   iov.iov_len = sizeof (dreg_state);
 
@@ -902,7 +903,7 @@ aarch64_linux_child_post_startup_inferior (struct target_ops *self,
                                           ptid_t ptid)
 {
   aarch64_forget_process (ptid_get_pid (ptid));
-  aarch64_linux_get_debug_reg_capacity ();
+  aarch64_linux_get_debug_reg_capacity (ptid);
   super_post_startup_inferior (self, ptid);
 }
 
This page took 0.029663 seconds and 4 git commands to generate.