This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Crash in write_exp_msymbol for coff targets.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]