new core files

Egor Duda
Thu May 13 19:36:00 GMT 1999


May 11 1999 Chris Faylor <> wrote:

>>I've already posted a patch to allow JIT debugging of cygwin apps with
>>gdb. Core files are good to find out why in hell one of your daemons
>>crashed at 03:00am and dragged all your system down at 03:05am.
>>Actually, i intend to add support for jit debugging and core dumping
>>in a uniform way. You would just specify through %CYGWIN% a program to
>>run in a case of trap and application will try to start it (passing
>>some   info   about   itself).   Will   this   program  be  gdb(jit),
>>core-dumper(post-mortem), something else or nothing -- it's up to you.

CF> That sounds perfect to me.

So,   here's  a  patch.  It  includes  my (slightly modified) previous
patch,  core  dumper  utility,  and  patches  to bfd and gdb to handle
cygwin cores. To use it one should set CYGWIN env variable to

CTGWIN= ... error_start=/bin/dumper.exe ...

Currently,  dumper  writes  core  for  <program>  to  <program>._core
(to  coexist  with  old-style  cores).  I don't think its a good idea,
because  most  "make  clean"s  remove  *.core,  not *._core :)

Then core file then can be read by standard "gdb --core=<program>._core"

The  only  thing  I'm not sure about is how well this patches fit into
cross-toolchains.  I  haven't  much experience in such things, so I've
just tried to "mimic" existing style.

JIT debugging works the same way --

CTGWIN= ... error_start=/bin/gdb.exe ...

Egor.   ICQ 5165414 FidoNet 2:5020/496.19

More information about the Cygwin-developers mailing list