aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2015-03-24 14:05:44 +0000
committerGary Benson <gbenson@redhat.com>2015-03-24 14:05:44 +0000
commit34c703da6cb01d8b41e1bfb790c3c2c625088b69 (patch)
tree11ccf7b832cefc43946df6c8c948aa756a161285
parentcff068da9d13bc9fa8c04f42151b4e92bfff86a1 (diff)
downloadgdb-34c703da6cb01d8b41e1bfb790c3c2c625088b69.zip
gdb-34c703da6cb01d8b41e1bfb790c3c2c625088b69.tar.gz
gdb-34c703da6cb01d8b41e1bfb790c3c2c625088b69.tar.bz2
Change signature of linux_target_ops.new_thread
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.
-rw-r--r--gdb/gdbserver/ChangeLog9
-rw-r--r--gdb/gdbserver/linux-aarch64-low.c6
-rw-r--r--gdb/gdbserver/linux-arm-low.c6
-rw-r--r--gdb/gdbserver/linux-low.c2
-rw-r--r--gdb/gdbserver/linux-low.h2
-rw-r--r--gdb/gdbserver/linux-mips-low.c6
-rw-r--r--gdb/gdbserver/linux-x86-low.c6
7 files changed, 23 insertions, 14 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index a77f04b..1f5e4c1 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,14 @@
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.
(lwp_is_stopped): Likewise.
(lwp_stop_reason): Likewise.
diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index 7934e78..d44175e 100644
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -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.
diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c
index 2cd1668..d408dcd 100644
--- a/gdb/gdbserver/linux-arm-low.c
+++ b/gdb/gdbserver/linux-arm-low.c
@@ -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.
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index f2a2224..93656c0 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -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);
diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
index 5c52b14..1ae3701 100644
--- a/gdb/gdbserver/linux-low.h
+++ b/gdb/gdbserver/linux-low.h
@@ -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 *);
diff --git a/gdb/gdbserver/linux-mips-low.c b/gdb/gdbserver/linux-mips-low.c
index f081dda..7988d07 100644
--- a/gdb/gdbserver/linux-mips-low.c
+++ b/gdb/gdbserver/linux-mips-low.c
@@ -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
diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
index 43bf829..4a7cf42 100644
--- a/gdb/gdbserver/linux-x86-low.c
+++ b/gdb/gdbserver/linux-x86-low.c
@@ -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. */