From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30530 invoked by alias); 10 Apr 2007 10:45:44 -0000 Received: (qmail 30521 invoked by uid 22791); 10 Apr 2007 10:45:43 -0000 X-Spam-Check-By: sourceware.org Received: from wx-out-0506.google.com (HELO wx-out-0506.google.com) (66.249.82.228) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 10 Apr 2007 11:45:41 +0100 Received: by wx-out-0506.google.com with SMTP id t13so1600892wxc for ; Tue, 10 Apr 2007 03:45:39 -0700 (PDT) Received: by 10.70.129.6 with SMTP id b6mr12434711wxd.1176201939761; Tue, 10 Apr 2007 03:45:39 -0700 (PDT) Received: by 10.70.8.15 with HTTP; Tue, 10 Apr 2007 03:45:39 -0700 (PDT) Message-ID: <4053daab0704100345x5eee0dcav7104180ad93e5750@mail.gmail.com> Date: Tue, 10 Apr 2007 10:45:00 -0000 From: "Pedro Alves" To: gdb-patches@sourceware.org Subject: Re: [Cygwin] Fix for: detaching crashes the inferior. In-Reply-To: <20070410051535.GA11134@ednor.casa.cgf.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4618D3F7.3040700@portugalmail.pt> <4619748C.5080007@portugalmail.pt> <46199F9C.1060803@portugalmail.pt> <20070410051535.GA11134@ednor.casa.cgf.cx> X-Google-Sender-Auth: f49cc135d4593671 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/msg00076.txt.bz2 On 4/10/07, Christopher Faylor wrote: > 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. > I tried that many times, with the following test program: $ cat main.c #include #include int main(int argc, char** argv) { int count = 0; while (1) { printf ("count = %d\n", count++); fflush (stdout); Sleep (1000); } } I attached with gdb --pid , set a break on line 9, continue, breakpoint is hit, hit next a couple of times, detach, reattach without restarting gdb, continue till the breakpoint, step a couple times, remove breakpoint, detach, restart gdb, attach, do the same, but letting gdb start the inferior as a child, redo the testing a couple of times, and nothing bad happens... ... except that once, I saw for this warning: (gdb) attach 2396 Warning: Failed to get SE_DEBUG_NAME privilege This can cause attach to fail on Windows NT/2K/XP Attaching to program `/cygdrive/d/gdb-20070402/build/main.exe', process 2396 Loaded symbols for /cygdrive/c/WINNT/system32/ntdll.dll Loaded symbols for /cygdrive/c/WINNT/system32/kernel32.dll Loaded symbols for /usr/bin/cygwin1.dll Loaded symbols for /cygdrive/c/WINNT/system32/advapi32.dll Loaded symbols for /cygdrive/c/WINNT/system32/rpcrt4.dll Loaded symbols for /cygdrive/c/WINNT/system32/secur32.dll Loaded symbols for /cygdrive/c/WINNT/system32/user32.dll Loaded symbols for /cygdrive/c/WINNT/system32/gdi32.dll [Switching to thread 2396.0xe3c] Have no idea if that is really a problem, but it should be a separate patch. Cheers, Pedro Alves