From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31936 invoked by alias); 20 Jan 2012 19:53:01 -0000 Received: (qmail 31723 invoked by uid 22791); 20 Jan 2012 19:52:59 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Jan 2012 19:52:47 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0KJqkBT029887 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 20 Jan 2012 14:52:47 -0500 Received: from host2.jankratochvil.net (ovpn-116-21.ams2.redhat.com [10.36.116.21]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q0KJqhXu012743 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 20 Jan 2012 14:52:46 -0500 Date: Fri, 20 Jan 2012 19:54:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] Code cleanup: gdbserver: Use ptid_is_pid Message-ID: <20120120195242.GA4254@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00742.txt.bz2 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 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);