From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28407 invoked by alias); 5 Mar 2010 16:26:45 -0000 Received: (qmail 28399 invoked by uid 22791); 5 Mar 2010 16:26:44 -0000 X-SWARE-Spam-Status: No, hits=-7.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS 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, 05 Mar 2010 16:26:39 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o25GQcCx014268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 5 Mar 2010 11:26:38 -0500 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o25GQbXV021314 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 5 Mar 2010 11:26:37 -0500 Date: Fri, 05 Mar 2010 16:26:00 -0000 From: Kevin Buettner To: gdb-patches@sourceware.org Subject: Re: [RFC] remote-mips.c: Fix bit rot associated with the inferior's state Message-ID: <20100305092637.16a2c569@redhat.com> In-Reply-To: <201003051553.46571.pedro@codesourcery.com> References: <20100301172548.1672f69e@redhat.com> <201003040033.24702.pedro@codesourcery.com> <20100304163319.30a3991e@redhat.com> <201003051553.46571.pedro@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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-03/txt/msg00234.txt.bz2 On Fri, 5 Mar 2010 15:53:46 +0000 Pedro Alves wrote: > > I tried setting attach_flag in the inferior and making mips_kill throw > > an error, but that messes up gdb.base/opaque.exp. [...] > > I'd call it a test bug to be trying to kill on such > configuration... I think you might be right since gdb.base/opaque.exp is one of the few tests for which this is a problem. (It might even be the only test for which this is a problem.) > > * remote-mips.c (gdbthread.h): Include. > > (remote_mips_ptid): Declare. > > (mips_error): Only mourn the inferior when inferior_ptid is non-null. > > (common_open): Set inferior_ptid, add it as an inferior, and > > as a thread too. Delete FIXME comment regarding start_remote(). > > (mips_close): Invoke generic_mourn_inferior(). > > (mips_kill): Make sure that target_mourn_inferior is invoked. > > (mips_mourn_inferior): Don't invoke generic_mourn_inferior, as > > it's now invoked from mips_close(). > > (mips_load): Don't null out inferior_ptid. Don't call > > clear_symtab_users(). > > (mips_thread_alive, mips_pid_to_str): New functions. > > (_initialize_remote_mips): Initialize remote_mips_ptid. Initialize > > to_thread_alive and to_pid_to_str operations. > > Looks good to me. Thanks. I've committed this patch. Thanks again for your reviews. Kevin