Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Mark Kettenis <kettenis@chello.nl>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [branch patch] dwarf-frame.c support for .eh_frame_hdr
Date: Thu, 15 May 2003 22:06:00 -0000	[thread overview]
Message-ID: <200305152206.h4FM6Nu11992@magilla.sf.frob.com> (raw)
In-Reply-To: Mark Kettenis's message of  Thursday, 15 May 2003 23:49:16 +0200 <200305152149.h4FLnGHK000471@elgar.kettenis.dyndns.org>

> Having to build a "dummy" `struct comp_unit' probably indicates that I
> should change read_encoded_value()'s signature.  Well, I'll worry
> about that later.

Yeah, it was ok.  Since you need to provide several things for it to work
in all cases (the bfd for byteorder, dwarf_frame_* for relative calculation)
using that struct seems about as good as anything.

> The error messages in dwarf-frame.c should probably be harmonized
> before we check merge this into mailine.  I wonder whether we should
> complaint() instead of error().

I have no opinion on that.  The style of the messages I added was pretty
much copied from dwarf2read.c and/or dwarf2cfi.c.  I can update the code I
added following whatever model of similar error reporting you point me at.

> Is there a particular reason why you don't read in the .eh_frame_hdr
> section as a whole as the other parts of GDB's "symbol reader" do (and
> which I just blindly copied when I wrote the guts of dwarf-frame.c)?

Not really.  It was as easy to write it that way as anything else.
bfd_bread is already going through stdio (or even BFD_IN_MEMORY), so the
buffering of the reads is not really an issue (in copying the whole section
you are just copying from one memory buffer to another).  I may have had it
in the back of my head that I wouldn't know the size until I decoded the
header and FDE count, but the section bounds do already suffice and just
reading the whole section in one chunk would be fine.  I can rewrite it
that way if people prefer it.

> 	   * symfile.c (symfile_bfd_open): Try bfd_check_format with bfd_core
> 	   if bfd_object fails.
> 
> I think a more elaborate comment on why core files might have
> "symbols" is appropriate.

Yes, I hadn't really intended this patch to go in without further vetting.
I included it in the posting because it lets you do the test I demonstrated
to exercise the new dwarf-frame.c code.  I included it with the posting of
the corelow.c patch that makes it really relevant, which also deserves more
comments in its code.  I haven't yet gotten any feedback on that patch, and
hadn't bothered to polish it up before it becoming clear the code itself
would be taken in the form I wrote it.


Thanks,
Roland


      parent reply	other threads:[~2003-05-15 22:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-12  9:47 Roland McGrath
2003-05-13  3:27 ` Elena Zannoni
2003-05-13  3:42   ` Roland McGrath
2003-05-15 21:49 ` Mark Kettenis
2003-05-15 22:00   ` Elena Zannoni
2003-05-15 22:19     ` [branch patch] core files as symfiles Roland McGrath
2003-05-15 23:58       ` Andrew Cagney
2003-05-15 22:06   ` Roland McGrath [this message]

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=200305152206.h4FM6Nu11992@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kettenis@chello.nl \
    /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