aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/spu-low.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-04-01 22:29:33 +0000
committerPedro Alves <palves@redhat.com>2009-04-01 22:29:33 +0000
commit2bd7c093f663139ad9e57ddc748ade12f6bfbe01 (patch)
treebe36f0052daf9c01fb4dd489532987aa2bb5b7d4 /gdb/gdbserver/spu-low.c
parentc35fafde7ca3b92581dee5c0ed445de3c667ab2d (diff)
downloadgdb-2bd7c093f663139ad9e57ddc748ade12f6bfbe01.zip
gdb-2bd7c093f663139ad9e57ddc748ade12f6bfbe01.tar.gz
gdb-2bd7c093f663139ad9e57ddc748ade12f6bfbe01.tar.bz2
* target.h (struct thread_resume): Delete leave_stopped member.
(struct target_ops): Add a `n' argument to the `resume' callback. * server.c (start_inferior): Adjust. (handle_v_cont, myresume): Adjust. * linux-low.c (check_removed_breakpoint): Adjust to resume interface change, and to removed leave_stopped field. (resume_ptr): Delete. (struct thread_resume_array): New. (linux_set_resume_request): Add new `arg' parameter. Adjust to resume interface change. (linux_continue_one_thread, linux_queue_one_thread) (resume_status_pending_p): Check if the resume field is NULL instead of checking the leave_stopped member. (linux_resume): Adjust to the target resume interface change. * spu-low.c (spu_resume): Adjust to the target resume interface change. * win32-low.c (win32_detach, win32_resume): Ditto.
Diffstat (limited to 'gdb/gdbserver/spu-low.c')
-rw-r--r--gdb/gdbserver/spu-low.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c
index 12d25e8..792241c 100644
--- a/gdb/gdbserver/spu-low.c
+++ b/gdb/gdbserver/spu-low.c
@@ -345,24 +345,27 @@ spu_thread_alive (unsigned long tid)
/* Resume process. */
static void
-spu_resume (struct thread_resume *resume_info)
+spu_resume (struct thread_resume *resume_info, size_t n)
{
- while (resume_info->thread != -1
- && resume_info->thread != current_tid)
- resume_info++;
+ size_t i;
- if (resume_info->leave_stopped)
+ for (i = 0; i < n; i++)
+ if (resume_info[i].thread == -1
+ || resume_info[i].thread == current_tid)
+ break;
+
+ if (i == n)
return;
/* We don't support hardware single-stepping right now, assume
GDB knows to use software single-stepping. */
- if (resume_info->step)
+ if (resume_info[i].step)
fprintf (stderr, "Hardware single-step not supported.\n");
regcache_invalidate ();
errno = 0;
- ptrace (PTRACE_CONT, current_tid, 0, resume_info->sig);
+ ptrace (PTRACE_CONT, current_tid, 0, resume_info[i].sig);
if (errno)
perror_with_name ("ptrace");
}