core dump support for cygwin

Egor Duda deo@logos-m.ru
Thu Aug 24 08:10:00 GMT 2000


Hi!

  these  are  patches   for  gdb  and  winsup  to implement core dumps
support   in  cygwin.  core  dumps  are  created  by  dumper  utility
(winsup/utils/dumper.exe)

=====================================================================
Usage: dumper [-v] [-c filename] pid
-c filename -- dump core to filename.core
-d          -- print some debugging info while dumping
pid         -- win32-pid of process to dump
=====================================================================

then open filename.core with gdb just like ordinary core dump

gdb --core=filename.core

dumper cam be used with cygwin's jit-debugging facility. add

error_start=c:\cygwin\bin\dump.cmd

to  CYGWIN environment variable and create c:\cygwin\bin\dump.cmd file
with single line: 

=====================================================================
c:\cygwin\bin\dumper.exe -d -c %1 %2
=====================================================================

if  your  program  encounters exception, progname.exe.core file will be
created in current directory along with progname.exe.stackdump.

Bugs and features.
1. gdb complains about unknown architecture when loading core file.
2.  core  file  contains references to all executable images that were
mapped  in  process address space when dump was created. sections with
executable  code  and  debug  symbols are stripped from core dump, and
loaded  by gdb afterwards. if you move, delete or change some of those
dlls  between  core   dump  creation  and  core  dump  analysis you'll
miss some information  when debugging. no checks are performed to make
sure that dlls haven't been changed. similar applies to debugging core
dump on another machine.
3. dumped application terminates after dump is complete.

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
cygwin-core-dump.gdb.ChangeLog.gz
cygwin-core-dump.gdb.diff.gz
cygwin-core-dump.winsup.ChangeLog.gz
cygwin-core-dump.winsup.diff.gz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin-core-dump.gdb.ChangeLog.gz
Type: application/x-gzip
Size: 600 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20000824/29810b2c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin-core-dump.gdb.diff.gz
Type: application/x-gzip
Size: 3457 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20000824/29810b2c/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin-core-dump.winsup.ChangeLog.gz
Type: application/x-gzip
Size: 331 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20000824/29810b2c/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin-core-dump.winsup.diff.gz
Type: application/x-gzip
Size: 8086 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20000824/29810b2c/attachment-0003.bin>


More information about the Cygwin-patches mailing list