From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20750 invoked by alias); 10 Apr 2007 09:31:49 -0000 Received: (qmail 20742 invoked by uid 22791); 10 Apr 2007 09:31:49 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 10 Apr 2007 10:31:44 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id 41D4C6D481E; Tue, 10 Apr 2007 11:31:42 +0200 (CEST) Date: Tue, 10 Apr 2007 09:31:00 -0000 From: Corinna Vinschen To: gdb-patches@sourceware.org Cc: Pedro Alves Subject: Re: [Cygwin] Fix for: detaching crashes the inferior. Message-ID: <20070410093142.GC21074@calimero.vinschen.de> Reply-To: gdb-patches@sourceware.org Mail-Followup-To: gdb-patches@sourceware.org, Pedro Alves References: <4618D3F7.3040700@portugalmail.pt> <4619748C.5080007@portugalmail.pt> <46199F9C.1060803@portugalmail.pt> <20070410051535.GA11134@ednor.casa.cgf.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070410051535.GA11134@ednor.casa.cgf.cx> User-Agent: Mutt/1.4.2.2i 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: 2007-04/txt/msg00074.txt.bz2 On Apr 10 01:15, Christopher Faylor wrote: > On Mon, Apr 09, 2007 at 03:06:20AM +0100, Pedro Alves wrote: > >The real reason for the crashes is that we should be setting > >the context back to the inferior, as gdb's copy contains > >an adjusted PC. With win32_continue we would resume the > >inferior at the wrong address. win32_resume takes care of > >that, so the simple fix is to use it when detaching. > >[...] > Are you sure you aren't seeing problems when you attach/detach more than > once? I know that there is someplace that isn't getting cleared in that > scenario. I have thought that I fixed that problem a few times but it > still seems to be there in the latest cygwin release. What "someplace" are you referring to, Chris? Maybe that can be solved, too, while we're at it. > Anyway, I'd like Corinna to comment on this if possible since that > particular piece of code that you're patching is hers, I believe. Calling win32_resume seems actually to be the better choice here. The patch looks ok to me. Corinna -- Corinna Vinschen Cygwin Project Co-Leader Red Hat