Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Kevin Buettner <kevinb@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2 4/5] Provide access to non SEC_HAS_CONTENTS core file sections
Date: Thu, 21 May 2020 18:06:25 +0100	[thread overview]
Message-ID: <29ef36ae-c582-44e7-aaf7-fdef10249455@redhat.com> (raw)
In-Reply-To: <20200521005020.697d1bf1@f31-4.lan>

On 5/21/20 8:50 AM, Kevin Buettner via Gdb-patches wrote:
> On Wed, 20 May 2020 17:45:28 +0100
> Pedro Alves <palves@redhat.com> wrote:
> On Linux, we're able to do "info proc mappings" when looking at a
> corefile.  Linux core files include a .note.linuxcore.file/pid section
> which contain the map data that you see when running "info proc
> mappings".
> 
> It may be possible to use these mappings to provide a more accurate
> view of memory contents when working with a core file.  In addition
> to file backed data that we already know about from the executable and
> shared libraries, there may be additional file backed data that can
> be found via files listed in the .note section mentioned earlier.  Or,
> as I found while investigating that one of those weird F27 mappings,
> there may be data from a shared library which can't be found in
> what GDB knows about when loading the shared library.  (In that
> particular case, the memory region in question contained some
> vtable data prior to being remapped - though I'm guessing about
> the remapping bit.)

Yeah, that's a good idea.

> 
> If you think it worth pursuing, I can look at using the core-provided
> proc mapping information to provide a more accurate view of memory
> when looking at a core dump.

I think it's worth pursuing.  If we have proc mappings data, we could
only read from the exec file first if the mapping is file-backed.
That sounds like would plug the ambiguity.

> 
> If I do this, is it still worth pushing this v2 series first?  Or should
> it wait until I attempt to incorporate info from the .note section?

I'd say give it a try, see if it would be too complicated.
If it isn't, then I think it would be nice to merge it all
together.

Thanks,
Pedro Alves



  parent reply	other threads:[~2020-05-21 17:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 17:11 [PATCH v2 0/5] Fix BZ 25631 - core file memory access problem Kevin Buettner
2020-05-13 17:11 ` [PATCH v2 1/5] Remove hack for GDB which sets the section size to 0 Kevin Buettner
2020-05-13 17:11 ` [PATCH v2 2/5] Adjust corefile.exp test to show regression after bfd hack removal Kevin Buettner
2020-05-20 16:24   ` Pedro Alves
2020-05-13 17:11 ` [PATCH v2 3/5] section_table_xfer_memory: Replace section name with callback predicate Kevin Buettner
2020-05-20 16:33   ` Pedro Alves
2020-05-13 17:11 ` [PATCH v2 4/5] Provide access to non SEC_HAS_CONTENTS core file sections Kevin Buettner
2020-05-20 16:45   ` Pedro Alves
2020-05-21  7:50     ` Kevin Buettner
2020-05-21 12:40       ` Pedro Alves
2020-05-21 14:23         ` Pedro Alves
2020-05-21 15:09           ` Kevin Buettner
2020-05-21 16:28             ` Pedro Alves
2020-05-21 17:06       ` Pedro Alves [this message]
2020-05-13 17:11 ` [PATCH v2 5/5] Test ability to access unwritten-to mmap data in core file Kevin Buettner
2020-05-20 16:46   ` 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=29ef36ae-c582-44e7-aaf7-fdef10249455@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@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