This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Code cleanup: gdbserver: Use ptid_is_pid


Hi,

probably obvious.  I will check it in with no response.

No regressions in gdbserver mode on
{x86_64,x86_64-m32,i686}-fedorarawhide-linux-gnu.  The callers look no
null_ptid can be used there.


Thanks,
Jan


gdb/gdbserver/
2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Code cleanup.
	* linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.

--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]