From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24997 invoked by alias); 28 Jan 2010 14:55:43 -0000 Received: (qmail 24984 invoked by uid 22791); 28 Jan 2010 14:55:41 -0000 X-Spam-Check-By: sourceware.org Received: from pool-173-76-58-83.bstnma.fios.verizon.net (HELO cgf.cx) (173.76.58.83) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Jan 2010 14:55:37 +0000 Received: from ednor.cgf.cx (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with ESMTP id A3C4713C0C7; Thu, 28 Jan 2010 09:55:27 -0500 (EST) Received: by ednor.cgf.cx (Postfix, from userid 201) id 5B6342B35A; Thu, 28 Jan 2010 09:55:27 -0500 (EST) Date: Thu, 28 Jan 2010 14:55:00 -0000 From: Christopher Faylor To: gdb-patches@sourceware.org, Tristan Gingold Subject: Re: [RFA] windows: do not crash if inferior Message-ID: <20100128145526.GA16369@ednor.casa.cgf.cx> Mail-Followup-To: gdb-patches@sourceware.org, Tristan Gingold 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> <7C5E774B-D5A8-4020-B491-CF8B34117882@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7C5E774B-D5A8-4020-B491-CF8B34117882@adacore.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00604.txt.bz2 On Tue, Jan 26, 2010 at 04:59:07PM +0100, Tristan Gingold wrote: > >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: >>> >>>> Actually, how about something like this instead? I used the same wording as fork-child.c >>>> after seeing Pedro's note. >>> >>>> + if (!windows_initialization_done) >>>> + error (_("During startup program exited with code 0x%x."), (unsigned int) current_event.u.ExitProcess.dwExitCode); >>> >>> 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. >> >> 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. >> >> 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. Thanks. Applied. cgf