From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27516 invoked by alias); 24 Nov 2007 20:48:35 -0000 Received: (qmail 27506 invoked by uid 22791); 24 Nov 2007 20:48:34 -0000 X-Spam-Check-By: sourceware.org Received: from pool-70-20-17-24.bstnma.fios.verizon.net (HELO ednor.cgf.cx) (70.20.17.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 24 Nov 2007 20:48:30 +0000 Received: by ednor.cgf.cx (Postfix, from userid 201) id E97592B352; Sat, 24 Nov 2007 15:48:28 -0500 (EST) Date: Sat, 24 Nov 2007 20:48:00 -0000 From: Christopher Faylor To: Lerele , gdb-patches@sourceware.org Subject: Re: [win32] Fix suspend count handling Message-ID: <20071124204828.GB4928@ednor.casa.cgf.cx> Mail-Followup-To: Lerele , gdb-patches@sourceware.org References: <000001c82c31$4a57b220$df071660$@u-strasbg.fr> <4053daab0711210543w4b241e1ek2371e887f3c4f7d2@mail.gmail.com> <000401c82c48$a450df10$ecf29d30$@u-strasbg.fr> <4053daab0711210708o607018b9n8b63147a8498a207@mail.gmail.com> <4053daab0711211019r15f3a862g677080b65b4d8e71@mail.gmail.com> <4744BCCE.60705@portugalmail.pt> <20071123010744.GA31180@ednor.casa.cgf.cx> <4746A922.30404@champenstudios.com> <20071124053341.GA4214@ednor.casa.cgf.cx> <474832C2.7030307@champenstudios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <474832C2.7030307@champenstudios.com> User-Agent: Mutt/1.5.16 (2007-06-09) 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-11/txt/msg00456.txt.bz2 On Sat, Nov 24, 2007 at 03:18:42PM +0100, Lerele wrote: >>> Christopher Faylor escribi?: >>>> I have to ask, however, if the SuspendThread's are even needed at all. >>>> When I was writing this code, I wasn't entirely sure that gdb needed to >>>> do anything like this but I erred on the side of caution. So, I'm >>>> wondering if things would still work ok if the >>>> SuspendThread/ResumeThread stuff was gone. >>>> >>> I think they are needed. They were anyway with the new gdbserver based >>> (vs. Win32 API based) interrupt code I sent several days ago, and that >>> so very kindly Pedro prepared for commitment, but that I still haven't >>> found the time to sit down and look at them (however I'm absolutely >>> sure they're just fine), I guess his changes must be similar to what I >>> sent in the first place. >>> >> >> *Why* did you think you needed them in gdbserver? Did you actually try >> not using them or did you just copy my code from win32-nat.c? > > I thought it natural to implement win32 functionality into gdbserver not > starting from scratch, but from an already working implementation, such as > win32-nat.c, however *truly* one drawback of this is that original code > bugs got inherited into new implementation (such as the subject in > question), and the porting process however was not really as > straightforward as copy/paste; certain amount of work was involved (a lot > of debugging gdbserver and gdb themselves), however I did not stop to think > that SuspendThread was not actually needed, as it was already there. So, in answer to my question about whether something was needed or not, you asserted that it wasn't needed because you copied the code that I wrote which was the source of my question. Sorry but that doesn't really answer my question. If Windows already does the SuspendThread on all threads on debug event then there is no reason to also do it in gdb. I was asking if anyone had actually checked if that was the case since it has been quite some time since I did any experiments. cgf