From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25607 invoked by alias); 8 Jun 2010 00:11:43 -0000 Received: (qmail 25579 invoked by uid 22791); 8 Jun 2010 00:11:29 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Jun 2010 00:11:20 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 68CFE32006; Mon, 7 Jun 2010 17:11:19 -0700 (PDT) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost3.vmware.com (Postfix) with ESMTP id 5DF3FCD928; Mon, 7 Jun 2010 17:11:19 -0700 (PDT) Message-ID: <4C0D8AA7.5090200@vmware.com> Date: Tue, 08 Jun 2010 00:11:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: Pedro Alves CC: "gdb-patches@sourceware.org" Subject: Re: [RFA] fix crasher on detach command References: <4C0D3636.8040206@vmware.com> <4C0D41B4.3020008@vmware.com> <201006072008.51363.pedro@codesourcery.com> <201006072012.18043.pedro@codesourcery.com> In-Reply-To: <201006072012.18043.pedro@codesourcery.com> Content-Type: multipart/mixed; boundary="------------060305090101020307070205" 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: 2010-06/txt/msg00195.txt.bz2 This is a multi-part message in MIME format. --------------060305090101020307070205 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Content-length: 440 Pedro Alves wrote: > To be a bit clearer -- > > you've said that the pid was left as 42000 (I assume you meant > inferior_ptid, but that find_inferior no longer finds that inferior. > Where is the current inferior getting it's pid cleared out? Why > aren't we clearing inferior_ptid as well? OK, right. remote_close calls discard_all_inferiors -- it should also set inferior_ptid to null_ptid at the same time. How's this patch? --------------060305090101020307070205 Content-Type: text/plain; name="detach.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="detach.txt" Content-length: 721 2010-06-07 Michael Snyder * remote.c (remote_close): Set inferior_ptid to null_ptid. Index: remote.c =================================================================== RCS file: /cvs/src/src/gdb/remote.c,v retrieving revision 1.415 diff -u -p -r1.415 remote.c --- remote.c 2 Jun 2010 22:21:53 -0000 1.415 +++ remote.c 8 Jun 2010 00:08:57 -0000 @@ -2811,6 +2811,7 @@ remote_close (int quitting) /* We don't have a connection to the remote stub anymore. Get rid of all the inferiors and their threads we were controlling. */ discard_all_inferiors (); + inferior_ptid = null_ptid; /* We're no longer interested in any of these events. */ discard_pending_stop_replies (-1); --------------060305090101020307070205--