summaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog7
-rw-r--r--gdb/gdbserver/linux-low.c9
-rw-r--r--gdb/gdbserver/server.c4
3 files changed, 14 insertions, 6 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index a64e8a29c86..588568344d9 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,10 @@
+2012-06-12 Yao Qi <yao@codesourcery.com>
+ Pedro Alves <palves@redhat.com>
+
+ * linux-low.c (linux_set_resume_request): Simplify predicate. Add
+ comment.
+ * server.c (handle_v_cont): Extend comment.
+
2012-06-11 Yao Qi <yao@codesourcery.com>
* linux-low.c (linux_attach): Add 'static'.
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 3e88c42405f..3d116fd46a2 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -3339,10 +3339,11 @@ linux_set_resume_request (struct inferior_list_entry *entry, void *arg)
ptid_t ptid = r->resume[ndx].thread;
if (ptid_equal (ptid, minus_one_ptid)
|| ptid_equal (ptid, entry->id)
- || (ptid_is_pid (ptid)
- && (ptid_get_pid (ptid) == pid_of (lwp)))
- || (ptid_get_lwp (ptid) == -1
- && (ptid_get_pid (ptid) == pid_of (lwp))))
+ /* Handle both 'pPID' and 'pPID.-1' as meaning 'all threads
+ of PID'. */
+ || (ptid_get_pid (ptid) == pid_of (lwp)
+ && (ptid_is_pid (ptid)
+ || ptid_get_lwp (ptid) == -1)))
{
if (r->resume[ndx].kind == resume_stop
&& thread->last_resume_kind == resume_stop)
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 9fd550b0971..96aa54b8fa2 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -1974,8 +1974,8 @@ handle_v_cont (char *own_buf)
/* `cont_thread' is still used in occasional places in the backend,
to implement single-thread scheduler-locking. Doesn't make sense
- to set it if we see a stop request, or any form of wildcard
- vCont. */
+ to set it if we see a stop request, or a wildcard action (one
+ with '-1' (all threads), or 'pPID.-1' (all threads of PID)). */
if (n == 1
&& !(ptid_equal (resume_info[0].thread, minus_one_ptid)
|| ptid_get_lwp (resume_info[0].thread) == -1)