From: Michael Snyder <msnyder@redhat.com>
To: Roland McGrath <roland@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] make gcore dump read-only sections not from files
Date: Thu, 09 Oct 2003 22:17:00 -0000 [thread overview]
Message-ID: <3F85DE6A.5040101@redhat.com> (raw)
In-Reply-To: <200310090244.h992io72028917@magilla.sf.frob.com>
Roland McGrath wrote:
> This works well enough. However, I think that making the determination
> based on the kernel-supplied indication of anonymous vs file-backed may
> make more sense. (Linux 2.6's behavior may be changing in this regard,
> and using that as a determining factor rather than just permission
> bits.) That would require changing the to_find_memory_regions interface
> as I described earlier. Can you comment on that?
I guess you mean this?
> Note that this patch makes gcore dump more regions than the Linux kernel
> does even with my change to its behavior. In particular, read-only
mmap'd
> portions of files are dumped by gcore but not by the kernel. This is a
> real common issue in practice, as your average GNU/Linux process nowadays
> has the large locale-archive file mapped in, and some processes may be
> mapping huge files in read-only. An alternative change would be to
change
> the to_find_memory_regions callback interface to add a flag argument
saying
> whether the memory region came from a file. Then gcore_create_callback
> could simply test !write && !anonymous and be wholly consistent with the
> kernel core dumping (assuming my change to it), and the infrun.c
change is
> not required
Sounds reasonable -- is it portable? A portable testcase for the
testsuite would make the change fairly easy to evaluate / approve.
next prev parent reply other threads:[~2003-10-09 22:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-07 8:19 Roland McGrath
2003-10-09 0:30 ` Michael Snyder
2003-10-09 2:44 ` Roland McGrath
2003-10-09 21:55 ` Michael Snyder
2003-10-11 1:57 ` Roland McGrath
2003-10-09 22:17 ` Michael Snyder [this message]
2003-10-11 2:20 ` Roland McGrath
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=3F85DE6A.5040101@redhat.com \
--to=msnyder@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=roland@redhat.com \
/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