aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2010-08-09 14:59:23 +0000
committerPedro Alves <palves@redhat.com>2010-08-09 14:59:23 +0000
commit1971b03393cfbbc43b8404e2a2c9a77f3161c67e (patch)
tree61f658bc797cc92bbf047b9009e9bd292687828d /gdb/gdbserver
parentb6951ff31c496a3d215aeba45b4c5c81185dea81 (diff)
downloadgdb-1971b03393cfbbc43b8404e2a2c9a77f3161c67e.zip
gdb-1971b03393cfbbc43b8404e2a2c9a77f3161c67e.tar.gz
gdb-1971b03393cfbbc43b8404e2a2c9a77f3161c67e.tar.bz2
* linux-low.c (gdb_wants_lwp_stopped): Delete.
(gdb_wants_all_stopped): Delete. (linux_wait_1): Don't call them. * server.c (handle_v_cont): Tag all threads as want-stopped. (gdb_wants_thread_stopped): Fix comments. Tag the thread that stopped as "client-wants-stopped".
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog9
-rw-r--r--gdb/gdbserver/linux-low.c48
2 files changed, 11 insertions, 46 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 059fab34..9b3a2fc 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,12 @@
+2010-08-09 Pedro Alves <pedro@codesourcery.com>
+
+ * linux-low.c (gdb_wants_lwp_stopped): Delete.
+ (gdb_wants_all_stopped): Delete.
+ (linux_wait_1): Don't call them.
+ * server.c (handle_v_cont): Tag all threads as want-stopped.
+ (gdb_wants_thread_stopped): Fix comments. Tag the thread that
+ stopped as "client-wants-stopped".
+
2010-07-31 Pedro Alves <pedro@codesourcery.com>
* Makefile.in (signals_h): New.
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 64007b0..dbad8c6 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -1809,24 +1809,6 @@ select_event_lwp (struct lwp_info **orig_lp)
}
}
-/* Set this inferior LWP's state as "want-stopped". We won't resume
- this LWP until the client gives us another action for it. */
-
-static void
-gdb_wants_lwp_stopped (struct inferior_list_entry *entry)
-{
- struct lwp_info *lwp = (struct lwp_info *) entry;
- struct thread_info *thread = get_lwp_thread (lwp);
-
- /* Most threads are stopped implicitly (all-stop); tag that with
- signal 0. The thread being explicitly reported stopped to the
- client, gets it's status fixed up afterwards. */
- thread->last_status.kind = TARGET_WAITKIND_STOPPED;
- thread->last_status.value.sig = TARGET_SIGNAL_0;
-
- thread->last_resume_kind = resume_stop;
-}
-
/* Decrement the suspend count of an LWP. */
static int
@@ -1853,14 +1835,6 @@ unsuspend_all_lwps (struct lwp_info *except)
find_inferior (&all_lwps, unsuspend_one_lwp, except);
}
-/* Set all LWP's states as "want-stopped". */
-
-static void
-gdb_wants_all_stopped (void)
-{
- for_each_inferior (&all_lwps, gdb_wants_lwp_stopped);
-}
-
static void move_out_of_jump_pad_callback (struct inferior_list_entry *entry);
static int stuck_in_jump_pad_callback (struct inferior_list_entry *entry,
void *data);
@@ -2389,8 +2363,6 @@ Check if we're already there.\n",
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- /* Do this before the gdb_wants_all_stopped calls below, since they
- always set last_resume_kind to resume_stop. */
if (current_inferior->last_resume_kind == resume_stop
&& WSTOPSIG (w) == SIGSTOP)
{
@@ -2413,30 +2385,14 @@ Check if we're already there.\n",
gdb_assert (ptid_equal (step_over_bkpt, null_ptid));
- if (stabilizing_threads)
- return ptid_of (event_child);
-
- if (!non_stop)
- {
- /* From GDB's perspective, all-stop mode always stops all
- threads implicitly. Tag all threads as "want-stopped". */
- gdb_wants_all_stopped ();
- }
- else
- {
- /* We're reporting this LWP as stopped. Update it's
- "want-stopped" state to what the client wants, until it gets
- a new resume action. */
- gdb_wants_lwp_stopped (&event_child->head);
- }
-
if (debug_threads)
fprintf (stderr, "linux_wait ret = %s, %d, %d\n",
target_pid_to_str (ptid_of (event_child)),
ourstatus->kind,
ourstatus->value.sig);
- current_inferior->last_status = *ourstatus;
+ if (!stabilizing_threads)
+ current_inferior->last_status = *ourstatus;
return ptid_of (event_child);
}