From: egor duda <deo@logos-m.ru>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: gdb@sources.redhat.com, sandmann@clio.rice.edu,
djgpp-workers@delorie.com
Subject: Re: Adding support for core files to DJGPP
Date: Mon, 02 Apr 2001 03:20:00 -0000 [thread overview]
Message-ID: <923311812.20010402141710@logos-m.ru> (raw)
In-Reply-To: <200104020813.KAA27119@is.elta.co.il>
Hi!
Monday, 02 April, 2001 Eli Zaretskii eliz@is.elta.co.il wrote:
>> all committed pages in process address space are written to .mem
>> sections
EZ> I don't see .mem sections mentioned anywhere in the SysV ABI documents
EZ> available from http://www.sco.com/developer/devspecs/ . Did I miss
EZ> something? Is there any other documentation about ELF available
EZ> somewhere, where these sections are documented?
i think ".mem/" sections is just a common convention gdb supports. System V
ABI specification explicitly says
(at http://www.sco.com/developer/gabi/latest/ch4.eheader.html )
"Although the core file contents are unspecified, type ET_CORE is reserved to
mark the file."
so i suppose the best way is to use the gdb and/or cygwin's dumper sources.
actually, all you have to do is
sprintf (sect_name, ".mem/%u", sect_no);
sect_flags = SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD;
sect_size = memory_block_size;
sect_vma = (bfd_vma) (memory_block_base_address);
and then write memory region contents to section via bfd_set_section_contents ().
>> winsup/utils/dumper.cc -- utility to create core file.
EZ> Does this mean that the segfaulting application itself doesn't write
EZ> the core file?
no, "kernel", i.e. cygwin1.dll in case of cygwin, is doing the job. when
application triggers exception that is supposed to cause core dump,
cygwin1.dll calls external utility passing crashed program pid and
path to it. this utility scans crashed program address space and
writes needed portions of it to the core file. so crashed program
address space isn't changed while core is being dumped.
Egor. mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
next prev parent reply other threads:[~2001-04-02 3:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-30 1:10 Eli Zaretskii
2001-03-30 2:32 ` egor duda
2001-03-30 3:28 ` Eli Zaretskii
2001-04-02 1:19 ` Eli Zaretskii
2001-04-02 3:20 ` egor duda [this message]
2001-03-30 6:44 David Taylor
2001-03-30 7:49 ` Eli Zaretskii
2001-03-30 11:44 ` J.T. Conklin
2001-03-31 1:43 ` Eli Zaretskii
2001-03-30 9:34 David Taylor
2001-03-30 11:14 ` H . J . Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=923311812.20010402141710@logos-m.ru \
--to=deo@logos-m.ru \
--cc=djgpp-workers@delorie.com \
--cc=eliz@is.elta.co.il \
--cc=gdb@sources.redhat.com \
--cc=sandmann@clio.rice.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox