From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16997 invoked by alias); 4 Nov 2007 02:27:58 -0000 Received: (qmail 16987 invoked by uid 22791); 4 Nov 2007 02:27:57 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.172) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 04 Nov 2007 02:27:54 +0000 Received: by ug-out-1314.google.com with SMTP id o2so860725uge for ; Sat, 03 Nov 2007 19:27:51 -0700 (PDT) Received: by 10.67.19.17 with SMTP id w17mr2880540ugi.1194143271711; Sat, 03 Nov 2007 19:27:51 -0700 (PDT) Received: from ?62.169.106.18? ( [62.169.106.18]) by mx.google.com with ESMTPS id i8sm4878979nfh.2007.11.03.19.27.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 03 Nov 2007 19:27:50 -0700 (PDT) Message-ID: <472D2E1B.2020203@portugalmail.pt> Date: Sun, 04 Nov 2007 02:27:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: Lerele CC: gdb-patches@sourceware.org Subject: Re: [RFC] New gdbserver Win32 interrupt code References: <472D2035.5070004@champenstudios.com> In-Reply-To: <472D2035.5070004@champenstudios.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: 2007-11/txt/msg00036.txt.bz2 Lerele wrote: > Hello, > > Sorry for the delay, didn't get the time to continue with gdbserver > Win32 coding. > Welcome back! > I have tried to code the bits with WinCE in mind by copying how it's > already done for WinCE (LoadLibrary basically), but I have not compiled > nor tested it under Windows CE. However, it does work fine with Cygwin. > I also implemented the synthetic suspending here, because soon after that thread, I had a need for it in WinCE. Unfortunatelly, I got distracted with other things and never submitted. I hate it when work gets duplicated :( At a quick glance, I think your patch should be at least split in 3. 1 - the synthetic suspending On WinCE, the synthetic suspending is also needed when attaching, since in opposition to 9xNT, the OS doesn't stop the inferior at all (neither when attaching nor running). If you're OK with it, I'll clean up my patch a bit, and merge with your bits so 1 can go in first. It will be easier for me this way, since I've already taken care of the function reusing and ifdefing minimising. I'll then volunteer to clean up the rest of your patch for you, as a reward for you patience ;) 2 - the suspend count handling This is also a problem in native debugging (gdb/win32-nat.c). I also saw this when doing my version of 1. I got a chance to look at the logs of the native WinCE debugger, and could infer that it also takes care of this correctly. The way they do it, is to read the current suspend count by always doing a SuspendThread + ResumeThread sequence on a debug event (ResumeThread return the current suspend count). 3 - the elevation Cheers, Pedro Alves