Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Subject: [patch] Code cleanup: gdbserver: Use ptid_is_pid
Date: Fri, 20 Jan 2012 19:54:00 -0000	[thread overview]
Message-ID: <20120120195242.GA4254@host2.jankratochvil.net> (raw)

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);


             reply	other threads:[~2012-01-20 19:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-20 19:54 Jan Kratochvil [this message]
2012-01-20 20:01 ` Pedro Alves
2012-01-20 21:20   ` [commit] " Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120120195242.GA4254@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox