This is the mail archive of the
mailing list for the Cygwin project.
Win32 GDB specific problem
- To: "'cygwin at cygwin dot com'" <cygwin at cygwin dot com>
- Subject: Win32 GDB specific problem
- From: Pierre Muller <muller at cerbere dot u-strasbg dot fr>
- Date: Fri, 03 Aug 2001 14:15:14 +0200
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
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?
Institut Charles Sadron
F 67083 STRASBOURG CEDEX (France)
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