add more words
This commit is contained in:
parent
1c2b9fe563
commit
8e2deb48d6
@ -1,22 +1,25 @@
|
||||
Copyright 2001 Red Hat Inc., Egor Duda
|
||||
|
||||
So, your favorite program has crashed? And did you say something about
|
||||
'stackdump'? Or it just prints its output from left to right and upside-down?
|
||||
Well, you can file an angry bug report and wait until some of the core
|
||||
developers try to reproduce your problem, try to find what's the matter
|
||||
with your program and cygwin and fix the bug, if any. But you can do something
|
||||
better than that. You can debug the problem yourself, and even if you can't
|
||||
fix it, your analysis may be very helpful. Here's the (incomplete) howto on
|
||||
cygwin debugging.
|
||||
'stackdump'? Or it just prints its output from left to right and
|
||||
upside-down? Well, you can file an angry bug report and wait until some
|
||||
of the core developers try to reproduce your problem, try to find what's
|
||||
the matter with your program and cygwin and fix the bug, if any. But
|
||||
you can do something better than that. You can debug the problem
|
||||
yourself, and even if you can't fix it, your analysis may be very
|
||||
helpful. Here's the (incomplete) howto on cygwin debugging.
|
||||
|
||||
1. The first thing you'll need to do is to build cygwin1.dll and your crashed
|
||||
application from sources. To debug them you'll need debug information, which
|
||||
is normally stripped from executables.
|
||||
1. The first thing you'll need to do is to build cygwin1.dll and your
|
||||
crashed application from sources. To debug them you'll need debug
|
||||
information, which is normally stripped from executables. You probably
|
||||
also want to build a version of the dll with more debugging capabilities
|
||||
by reconfiguring your build directory, specifying the --enable-debugging
|
||||
option to configure.
|
||||
|
||||
2. Create known-working cygwin debugging environment.
|
||||
- create a separate directory, say, c:\cygdeb, and put known-working
|
||||
- create a separate directory, say, c:\cygdeb, and put known-working
|
||||
cygwin1.dll and gdb.exe in it.
|
||||
- create a wrapper c:\cygdeb\debug_wrapper.cmd:
|
||||
- create a wrapper c:\cygdeb\debug_wrapper.cmd:
|
||||
|
||||
========= debug_wrapper.cmd =========
|
||||
rem setting CYGWIN_TESTING environment variable makes cygwin application
|
||||
@ -26,7 +29,7 @@ c:\cygdeb\gdb.exe -nw %1 %2
|
||||
===================================
|
||||
|
||||
3. Try to use cygwin's JIT debugging facility:
|
||||
- add 'error_start=c:\cygdeb\debug_wrapper.cmd' to CYGWIN environment
|
||||
add 'error_start=c:\cygdeb\debug_wrapper.cmd' to CYGWIN environment
|
||||
variable. When some application encounters critical error, cygwin will stop
|
||||
it and execute debug_wrapper.cmd, which will run gdb and make it to attach to
|
||||
the crashed application.
|
||||
@ -42,6 +45,10 @@ c:\cygdeb\gdb.exe -nw %1 %2
|
||||
timeouts introduced by strace, and -m option allows you to mask certain
|
||||
classes of *_printf() functions, reducing timeouts even more.
|
||||
|
||||
Note that strace does not use the cygwin DLL and so any process that it
|
||||
starts does not inherit a cygwin environment. It is equivalent to starting
|
||||
a program from the command prompt.
|
||||
|
||||
5. Problems at early startup.
|
||||
Sometimes, something crashes at the very early stages of application
|
||||
initialization, when JIT debugging facility is not yet active. Ok, there's
|
||||
|
Loading…
x
Reference in New Issue
Block a user