This is the mail archive of the gdb@sources.redhat.com 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: Mystified by "Internal error: pc 0x89f21e10 read in psymtab, but not in symtab


On Fri, Sep 13, 2002 at 04:13:04PM -0700, Earl Chew wrote:
> Daniel Jacobowitz wrote:
> > What version compiler and assembler are you using?  And are they FSF
> > or WindRiver-supplied?
> 
> FSF gcc 2.95.4 and binutils 2.11 (I think).

With any patches?  And, did you check which of .mdebug/.stab you're
getting?

> > > Patching dbxread.c
> > >
> > > pst->symtab = end_symtab (text_offset +
> > >                           text_size   +
> > >          section_offsets->offsets[SECT_OFF_TEXT (objfile)],
> > >          objfile, SECT_OFF_TEXT (objfile));
> > >
> > > cures the problem.
> > >
> > > But I'm not sure if this patch should be applied to
> > > end_symtab() instead. I looked and end_symtab() is called from
> > > many places, and I don't have enough information to decide
> > > if they're right/wrong in the manner of dbxread.c.
> > > 
> > This sounds like your GCC and binutils are out of sync, in fact.
> 
> I'm pretty sure there's something wrong with gdb in this regard
> because end_symtab is being called with cstk->start_addr
> (succesfully relocated) and end_addr (not relocated).

One difference between stabs-in-mdebug and stabs-in-elf is whether line
and other addresses are relative to the beginning of the function or
absolute.  A mismatch causes this symptom.  If you're getting
stabs-in-ELF, I believe GCC 2.95 is not prepared for that.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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