From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12904 invoked by alias); 26 Jan 2010 15:59:22 -0000 Received: (qmail 12893 invoked by uid 22791); 26 Jan 2010 15:59:21 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 26 Jan 2010 15:59:11 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 8ED33CB02B9; Tue, 26 Jan 2010 16:59:08 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CsInfBqAJfPM; Tue, 26 Jan 2010 16:59:08 +0100 (CET) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 7BB45CB01E8; Tue, 26 Jan 2010 16:59:08 +0100 (CET) Subject: Re: [RFA] windows: do not crash if inferior Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Tristan Gingold In-Reply-To: <20100121175659.GA1625@ednor.casa.cgf.cx> Date: Tue, 26 Jan 2010 15:59:00 -0000 Cc: gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <7C5E774B-D5A8-4020-B491-CF8B34117882@adacore.com> References: <1C9A707A-AE7C-4947-A9DA-F105674F81AE@adacore.com> <20100120161549.GA24063@ednor.casa.cgf.cx> <20100120173746.GA27289@ednor.casa.cgf.cx> <201001201912.12671.pedro@codesourcery.com> <20100121175659.GA1625@ednor.casa.cgf.cx> To: Christopher Faylor 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-01/txt/msg00573.txt.bz2 On Jan 21, 2010, at 6:56 PM, Christopher Faylor wrote: > On Wed, Jan 20, 2010 at 07:12:12PM +0000, Pedro Alves wrote: >> On Wednesday 20 January 2010 17:37:46, Christopher Faylor wrote: >>=20 >>> Actually, how about something like this instead? I used the same wordi= ng as fork-child.c >>> after seeing Pedro's note. >>=20 >>> + if (!windows_initialization_done) >>> + error (_("During startup program exited with code 0x%x."), (unsigned = int) current_event.u.ExitProcess.dwExitCode); >>=20 >> I think you should call target_mourn_inferior before >> throwing, to unpush the target_ops, clear inferior_ptid >> and delete any thread the OS had already reported, and >> maybe other things. You'll also want to call >> target_terminal_ours. >=20 > Yes, that should have been obvious to me since I was trying to duplicate > fork-child.c and it does exactly what you suggested. So the new patch > is below. >=20 > I don't have an easy way to test this. Can the OP confirm/deny that this > works as intended? Yes, this works as intended. Tristan.