Hi,

Does anyone know if there's any "dumper" utility program that can generate
core dump files for gdb on Mingw32?
The only project I can find is this:

http://members.telering.at/jessich/mingw/mingwdump/mingwdump.html

But it's pretty old (circa 2001), and it does not write the ".reg" section
to core file, which makes the core file less useful;  without register info,
gdb won't be able to walk the stack back trace for me.

There's a "dumper.cc" utlility program in Cygwin/winsup, but I don't think
it writes ".reg" section to core file, either;  is there any reason why they
choose not to write register info into core files for the win32 target?

I'm running gdb-6.3-2 on Mingw in win32 environment.  It can debug live
program launched via gdb without problem.  I went through the
gdb-6.3-2source code dealing with reading-i386-register-from-core-file
and found that
it seems to be missing (based on gdb-6.3-2/gdb/i386-tdep.c file), because:
1) i386-tdep.c file doesn't have data structure that defines i386 register
layout in core file,  hence
2) both  "tdep->gregset_reg_offset = NULL;"  & "tdep->sc_reg_offset =
NULL;", also in i386-tdep.c

Is there any technical reason why they're left out?  From i386-linux-tdep.c,
as well as i386*bsd-tdep.c's, I do see the i386 register layout as well as
tdep->gregset_reg_offset/sc_reg_offset being initialized to the (non-NULL)
layout data structure.

I'm trying the straightforwad solution to hack the mingwdump/dumper utility
to save ".reg/<pid>" section into core file, and patch the
gdb/i386-tdep.cfile with register layout info.   Is this enough to
have gdb do the stack
back trace for me?  (provided that ".reg" section is supplied).

Thanks in advance,

--- Jeffrey

Reply via email to