Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Pedro Alves <pedro_alves@portugalmail.pt>
Cc: gdb-patches@sourceware.org
Subject: Re: Crash in write_exp_msymbol for coff targets.
Date: Thu, 16 Nov 2006 23:59:00 -0000	[thread overview]
Message-ID: <20061116235909.GA32450@nevyn.them.org> (raw)
In-Reply-To: <455CF6BA.2030306@portugalmail.pt>

On Thu, Nov 16, 2006 at 11:39:38PM +0000, Pedro Alves wrote:
> Like in the attached patch1.diff?
> 
> Or, it isn't safe to index the objfile->sections by section index,
> and we have to look them up linearly? That is what patch2.diff does.
> In that version, I've repeated the search on coffread.c, caching the last
> section looked up. Only slightly tested, but I got around around 50% cache
> hit on a few exes. (Premature optimization?)

I'm somewhat worried about the numbering :-(  It looks like "int section"
is only useful for ANOFFSET / struct section_offsets.  And that
suggests there's no useful way to get from those numbers to the
bfd_section or vice versa.  What an awful mess.

I suppose the only way to fix this will be to overhaul the associated
code and reduce the number of numberings in use.  But in the mean time,
we should use your original patch that checked for non-NULL.  Sorry
for the runaround.

Shall I commit it for you?

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-11-16 23:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-16 20:53 Pedro Alves
2006-11-16 21:02 ` Daniel Jacobowitz
2006-11-16 23:40   ` Pedro Alves
2006-11-16 23:59     ` Daniel Jacobowitz [this message]
2006-11-17  0:47       ` Pedro Alves
2006-11-17  1:14         ` Pedro Alves
2006-11-18  1:15           ` Pedro Alves
2006-11-18 23:50           ` Daniel Jacobowitz
2006-11-19  4:05             ` Pedro Alves
2006-11-28 17:07               ` Daniel Jacobowitz
2006-11-18 23:54 ` Daniel Jacobowitz
2006-11-22  0:06   ` Joel Brobecker

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=20061116235909.GA32450@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro_alves@portugalmail.pt \
    /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