Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <4.2.0.58.20010803141303.01d72780@ics.u-strasbg.fr> X-Sender: muller AT ics DOT u-strasbg DOT fr X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Fri, 03 Aug 2001 14:15:14 +0200 To: "'cygwin AT cygwin DOT com'" From: Pierre Muller Subject: Win32 GDB specific problem Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed I am one of the persons that wrote the Text Mode IDE for Free Pascal Compiler. This Text Mode IDE includes GDB inside the executable and it can both compile, run noramlly and debug a given pascal source. For go32v2 (based on DJGPP) and Linux the repetition of compilation, debugging, editing, recompilation works without problems, but this fails for Win32 version. Once a file as been run under the internal debugger, there is no way to recompile it ! Cygwin GDB does have the same problem. Peter Vreman did some tests and came to the conclusion that this is not really GDB specific but that if some program calls CreateProcess with DEBUG_PROCESS option, then the OS leaves one handle open for this file until the whole debugger executable is terminated. Each run seems to open one handle more for the file and it's used DLLs. Peter also tested it without DEBUG_PROCESS and using CREATE_SUSPEND instead. This will start the child without letting it run. Then terminating the process will close all handles correct. So this might be a "feature" of Windows debugging ? Is this a known limitation/feature of the WinAPI ? Does anyone know of another possible fix to the problem ? (Apart from copying the executable to a temp name and running that temp, which will work but will consume megabytes of disk space really fast :( ) If it is indeed a OS feature, does anyone know how the commercial IDEs do solve this problem? Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller AT ics DOT u-strasbg DOT fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/