From: Pedro Alves <palves@redhat.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 2/2] Documentation and testcase
Date: Tue, 24 Mar 2015 10:12:00 -0000 [thread overview]
Message-ID: <55113880.4060707@redhat.com> (raw)
In-Reply-To: <87619q2961.fsf@redhat.com>
On 03/24/2015 06:37 AM, Sergio Durigan Junior wrote:
>
> The Linux kernel uses the bit 4 on the coredump_filter file to determine
> whether it should dump ELF headers or not. According to vma_dump_size:
...
> So maybe this is what you meant above by "that one ends up always
> dumped...", when refering to the first page of the text segment? Well,
> that is partially true: if you unset bit 4, you will see that this page
> does not get dumped at all (and therefore we see the "Cannot access
> memory..." error; I did some experiments here and confirmed that).
Ah, indeed I probably had bit 4 set.
> Therefore, if *also* considers tha case when the mapping is file-backed
> private (which my patch doesn't do).
>
> All this boils down to: my patch is incorrectly dumping the .text
> segment when I ask it not to do that (i.e., when I ask it to ignore
> file-backed private mappings and to dump anonymous private mappings),
> and it is *not* dumping the .text segment when I ask it to dump it
> (i.e., when I ask it to dump file-backed private mappings and to ignore
> anonymous private mappings).
>
> So, here's what I propose: I will rework this part of the patch and try
> to come up with a better way of identifying these situations (mainly:
> when a file-backed mapping has anonymous contents), and I will resubmit
> it tomorrow. Along with that, I should be able to extend the testcase
> to cover the disassemble case (and it should start to work fine once I
> make those adjustments).
Sounds good.
>
> Phew! What a confusion... :-/. I hope things are clearer with this
> e-mail.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-03-24 10:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-19 23:22 [PATCH v4 0/2] Improve corefile generation by using /proc/PID/coredump_filter (PR corefile/16902) Sergio Durigan Junior
2015-03-19 23:22 ` [PATCH 2/2] Documentation and testcase Sergio Durigan Junior
2015-03-20 19:46 ` Pedro Alves
2015-03-20 21:03 ` Sergio Durigan Junior
2015-03-20 22:09 ` Pedro Alves
2015-03-22 20:46 ` Sergio Durigan Junior
2015-03-23 20:27 ` Pedro Alves
2015-03-23 21:08 ` Sergio Durigan Junior
2015-03-23 23:06 ` Pedro Alves
2015-03-24 6:37 ` Sergio Durigan Junior
2015-03-24 10:12 ` Pedro Alves [this message]
2015-03-24 23:15 ` Sergio Durigan Junior
2015-03-24 23:48 ` Pedro Alves
2015-03-19 23:22 ` [PATCH 1/2] Implement support for checking /proc/PID/coredump_filter Sergio Durigan Junior
2015-03-20 19:12 ` Pedro Alves
2015-03-20 20:02 ` Sergio Durigan Junior
2015-03-20 22:02 ` Pedro Alves
2015-03-23 18:40 ` Sergio Durigan Junior
2015-03-23 20:36 ` Pedro Alves
2015-03-24 23:57 [PATCH v4 0/2] Improve corefile generation by using /proc/PID/coredump_filter (PR corefile/16902) Sergio Durigan Junior
2015-03-24 23:57 ` [PATCH 2/2] Documentation and testcase Sergio Durigan Junior
2015-03-27 9:53 ` Pedro Alves
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=55113880.4060707@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=sergiodj@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