Change signature of linux_target_ops.new_thread
authorGary Benson <gbenson@redhat.com>
Tue, 24 Mar 2015 14:05:44 +0000 (14:05 +0000)
committerGary Benson <gbenson@redhat.com>
Tue, 24 Mar 2015 14:05:44 +0000 (14:05 +0000)
This commit changes the signature of linux_target_ops.new_thread in
gdbserver to match that used in GDB's equivalent.

gdb/gdbserver/ChangeLog:

* linux-low.h (linux_target_ops) <new_thread>: Changed signature.
* linux-arm-low.c (arm_new_thread): Likewise.
* linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
* linux-mips-low.c (mips_linux_new_thread): Likewise.
* linux-x86-low.c (x86_linux_new_thread): Likewise.
* linux-low.c (add_lwp): Update the_low_target.new_thread call.

gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-aarch64-low.c
gdb/gdbserver/linux-arm-low.c
gdb/gdbserver/linux-low.c
gdb/gdbserver/linux-low.h
gdb/gdbserver/linux-mips-low.c
gdb/gdbserver/linux-x86-low.c

index a77f04ba705e747a0bf4feff743e92c7d858695e..1f5e4c12ca66e389a9447878863d31a95565e33a 100644 (file)
@@ -1,3 +1,12 @@
+2015-03-24  Gary Benson  <gbenson@redhat.com>
+
+       * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
+       * linux-arm-low.c (arm_new_thread): Likewise.
+       * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
+       * linux-mips-low.c (mips_linux_new_thread): Likewise.
+       * linux-x86-low.c (x86_linux_new_thread): Likewise.
+       * linux-low.c (add_lwp): Update the_low_target.new_thread call.
+
 2015-03-24  Gary Benson  <gbenson@redhat.com>
 
        * linux-low.c (ptid_of_lwp): New function.
index 7934e78575f9dc15d58793249f7a6680d74af1cd..d44175ef8e0a5a321fa3e328b5719aa6fb584412 100644 (file)
@@ -1121,8 +1121,8 @@ aarch64_linux_new_process (void)
 
 /* Called when a new thread is detected.  */
 
-static struct arch_lwp_info *
-aarch64_linux_new_thread (void)
+static void
+aarch64_linux_new_thread (struct lwp_info *lwp)
 {
   struct arch_lwp_info *info = xcalloc (1, sizeof (*info));
 
@@ -1132,7 +1132,7 @@ aarch64_linux_new_thread (void)
   DR_MARK_ALL_CHANGED (info->dr_changed_bp, aarch64_num_bp_regs);
   DR_MARK_ALL_CHANGED (info->dr_changed_wp, aarch64_num_wp_regs);
 
-  return info;
+  lwp->arch_private = info;
 }
 
 /* Called when resuming a thread.
index 2cd16682574c6338291e1238727ea821b287bfb0..d408dcda2ef1ba0c468153d1f5eadf804a34c7a9 100644 (file)
@@ -703,8 +703,8 @@ arm_new_process (void)
 }
 
 /* Called when a new thread is detected.  */
-static struct arch_lwp_info *
-arm_new_thread (void)
+static void
+arm_new_thread (struct lwp_info *lwp)
 {
   struct arch_lwp_info *info = xcalloc (1, sizeof (*info));
   int i;
@@ -714,7 +714,7 @@ arm_new_thread (void)
   for (i = 0; i < MAX_WPTS; i++)
     info->wpts_changed[i] = 1;
 
-  return info;
+  lwp->arch_private = info;
 }
 
 /* Called when resuming a thread.
index f2a2224601514833e615e76da8b45fe9f345bdd0..93656c0b4c89e75493f302679ed776598860f469 100644 (file)
@@ -640,7 +640,7 @@ add_lwp (ptid_t ptid)
   memset (lwp, 0, sizeof (*lwp));
 
   if (the_low_target.new_thread != NULL)
-    lwp->arch_private = the_low_target.new_thread ();
+    the_low_target.new_thread (lwp);
 
   lwp->thread = add_thread (ptid, lwp);
 
index 5c52b14f0016593126bf5eecb10f933704fc32b2..1ae37017f5733bf039fe48503455bd7c1f7b2eee 100644 (file)
@@ -185,7 +185,7 @@ struct linux_target_ops
   /* Hook to call when a new thread is detected.
      If extra per-thread architecture-specific data is needed,
      allocate it here.  */
-  struct arch_lwp_info * (*new_thread) (void);
+  void (*new_thread) (struct lwp_info *);
 
   /* Hook to call prior to resuming a thread.  */
   void (*prepare_to_resume) (struct lwp_info *);
index f081dda9ba24a97c600abdd5acf41d0e477848a6..7988d073dacc591385aa5b923d14df2babed7bed 100644 (file)
@@ -334,14 +334,14 @@ mips_linux_new_process (void)
    Mark the watch registers as changed, so the threads' copies will
    be updated.  */
 
-static struct arch_lwp_info *
-mips_linux_new_thread (void)
+static void
+mips_linux_new_thread (struct lwp_info *lwp)
 {
   struct arch_lwp_info *info = xcalloc (1, sizeof (*info));
 
   info->watch_registers_changed = 1;
 
-  return info;
+  lwp->arch_private = info;
 }
 
 /* This is the implementation of linux_target_ops method
index 43bf8296f5e888441daf64fa4b67bd59158dc384..4a7cf42fa6bad41f5c7205765eea799ad1115932 100644 (file)
@@ -757,14 +757,14 @@ x86_linux_new_process (void)
 
 /* Called when a new thread is detected.  */
 
-static struct arch_lwp_info *
-x86_linux_new_thread (void)
+static void
+x86_linux_new_thread (struct lwp_info *lwp)
 {
   struct arch_lwp_info *info = XCNEW (struct arch_lwp_info);
 
   info->debug_registers_changed = 1;
 
-  return info;
+  lwp->arch_private = info;
 }
 
 /* See nat/x86-dregs.h.  */
This page took 0.055801 seconds and 4 git commands to generate.