From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27004 invoked by alias); 25 Jan 2012 15:23:03 -0000 Received: (qmail 26996 invoked by uid 22791); 25 Jan 2012 15:23:02 -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; Wed, 25 Jan 2012 15:22:45 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0PFMilR023100 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 25 Jan 2012 10:22:44 -0500 Received: from host2.jankratochvil.net (ovpn-116-21.ams2.redhat.com [10.36.116.21]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q0PFMea4017243 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 25 Jan 2012 10:22:43 -0500 Date: Wed, 25 Jan 2012 15:57:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [patch 2/2] Fix watchpoints for multi-inferior #2 Message-ID: <20120125152240.GA26914@host2.jankratochvil.net> References: <20120102164652.GB10231@host2.jankratochvil.net> <4F02020F.5090906@gmail.com> <20120120213110.GB424@host2.jankratochvil.net> <4F1EAFE6.30202@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F1EAFE6.30202@redhat.com> 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/msg00865.txt.bz2 On Tue, 24 Jan 2012 14:19:34 +0100, Pedro Alves wrote: > On 01/20/2012 09:31 PM, Jan Kratochvil wrote: > > @@ -2107,7 +2090,14 @@ retry: > > if (thread == NULL) > > { > > struct thread_resume resume_info; > > - resume_info.thread = minus_one_ptid; > > + > > + /* Resume only a single process if requested so. */ > > + if (!ptid_equal (cont_thread, minus_one_ptid) > > + && ptid_get_lwp (cont_thread) == -1) > > + resume_info.thread = cont_thread; > > Just above we see: > > thread = (struct thread_info *) find_inferior_id (&all_threads, > cont_thread); > > /* No stepping, no signal - unless one is pending already, of course. */ > if (thread == NULL) > > So, cont_thread does not exist, which was the whole point of reaching > here. Therefore there's no use trying to resuming it (at first sight). > > BTW, I have just recently stumbled on this: > > http://sourceware.org/ml/gdb-patches/2012-01/msg00502.html > > But as said, I'll need to take a better look at the gdbserver bits. FYI I did not repost this patch part as it needs to be implemented by some larger code rewrite IMO now, anyway this patch chunk is not good according to your review. Thanks, Jan