public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@bigpond.net.au>
To: Mark Kettenis <kettenis@gnu.org>
Cc: bintuils@sources.redhat.com, gdb@sources.redhat.com
Subject: Re: elf.c assign_file_positions_for_segments
Date: Fri, 24 Sep 2004 00:18:00 -0000	[thread overview]
Message-ID: <20040924001757.GF30257@bubble.modra.org> (raw)
In-Reply-To: <20040923234221.GE30257@bubble.modra.org>

On Fri, Sep 24, 2004 at 09:12:22AM +0930, Alan Modra wrote:
> On Thu, Sep 23, 2004 at 05:51:17PM +0200, Mark Kettenis wrote:
> > I'm not sure where to fix this.
> 
> I didn't think about gdb using bfd to generate core files.  Clearly, I
> need to fix my breakage of assign_file_positions_for_segments.

While waiting for gdb to build, I took a look at gcore.c.  For read-only
sections, I see you clear SEC_LOAD but leave SEC_HAS_CONTENTS set.
This is very likely why you're getting filesz non-zero for these
sections.  The new code consistently checks both SEC_LOAD and
SEC_HAS_CONTENTS whereas the old code just checked SEC_HAS_CONTENTS in
one place.

I'll take a good look at exactly why the SEC_HAS_CONTENTS check is
needed, ie. whether the following comment reflects current reality.
/* We check SEC_HAS_CONTENTS here because if NOLOAD is used in a linker
   script we may have a section with SEC_LOAD clear but which is
   supposed to have contents.  */

If we really don't need the SEC_HAS_CONTENTS test, then I'll take it out
and gdb gcore should be OK, otherwise I might ask you to clear
SEC_HAS_CONTENTS in gdb.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

  reply	other threads:[~2004-09-24  0:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-23 15:51 Mark Kettenis
2004-09-23 23:42 ` Alan Modra
2004-09-24  0:18   ` Alan Modra [this message]
2004-09-24  3:09     ` Alan Modra
2004-09-24  6:36       ` Mark Kettenis
2004-09-28 16:15 Michael Chastain

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=20040924001757.GF30257@bubble.modra.org \
    --to=amodra@bigpond.net.au \
    --cc=bintuils@sources.redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=kettenis@gnu.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).