gdb/gdbserver/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 20 Jan 2012 20:02:25 +0000 (20:02 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 20 Jan 2012 20:02:25 +0000 (20:02 +0000)
Code cleanup.
* linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.

gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c

index 0cb67da17b47ac9ccf8fb3bf31302d7e830c31ec..dfc5cdd88041349ab495c8379a6ebdb9799ba70e 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       Code cleanup.
+       * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
+
 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
 
        * hostio.c (handle_readlink): New function.
index eb21e1420957a66a2f2c219df6d73e7fd2cf5e8e..653518046a2b14be53105f0ee67fa9cf87100707 100644 (file)
@@ -1578,8 +1578,7 @@ linux_wait_for_event_1 (ptid_t ptid, int *wstat, int options)
 
   /* Check for a lwp with a pending status.  */
 
-  if (ptid_equal (ptid, minus_one_ptid)
-      || ptid_equal (pid_to_ptid (ptid_get_pid (ptid)), ptid))
+  if (ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid))
     {
       event_child = (struct lwp_info *)
        find_inferior (&all_lwps, status_pending_p_callback, &ptid);