This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Win32 GDB specific problem


   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@ics.u-strasbg.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]