+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.
/* 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));
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.
}
/* 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;
for (i = 0; i < MAX_WPTS; i++)
info->wpts_changed[i] = 1;
- return info;
+ lwp->arch_private = info;
}
/* Called when resuming a thread.
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);
/* 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 *);
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
/* 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. */