* dcrt0.cc (dll_crt0_1): Delay closing of some handles until cygheap has been

set up.
(break_here): New function, for debugging.
(initial_env): Add program name to "Sleeping" message.  Implement new
"CYGWIN_DEBUG" environment variable option.
* exceptions.cc (debugger_command): Add argument to dumper call.
* strace.cc (strace::hello): Use winpid if cygwin pid is unavailable.
(strace::vsprntf): Ditto.
This commit is contained in:
Christopher Faylor
2002-07-13 21:08:13 +00:00
parent 0301bfd0ac
commit c03dba93d6
5 changed files with 66 additions and 9 deletions

View File

@@ -71,6 +71,19 @@ c:\some\path\bad_program.exe some parameters
After that you can normally step through the code in cygwin1.dll and
bad_program.exe
You can also set a CYGWIN_DEBUG variable to force the debugger to pop up
only when a certain program is run:
set CYGWIN_DEBUG=cat.exe=gdb.exe
This will force gdb.exe to start when the program name contains the string
"cat.exe". The '=gdb.exe' isn't really needed, since it is the default.
It is just there to show how you can specify a program to run when the
program starts.
Note that it bears repeating that both of the above options are *only*
available when configuring cygwin with --enable-debugging.
6. Heap corruption.
If your program crashes at malloc() or free() or when it references some
malloc()'ed memory, it looks like heap corruption. You can configure and