This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Re: Why does mips define elf_backend_sign_extend_vma to true?


On Wed, Aug 08, 2001 at 09:54:01AM -0700, Daniel Jacobowitz wrote:
> On Wed, Aug 08, 2001 at 09:02:49AM -0700, H . J . Lu wrote:
> > 
> > I am willing to buy it. The immediate problem is in
> > 
> > struct obj_section *
> > find_pc_sect_section (CORE_ADDR pc, struct sec *section)
> > {
> >   struct obj_section *s;
> >   struct objfile *objfile;
> > 
> >   ALL_OBJSECTIONS (objfile, s)
> >     if ((section == 0 || section == s->the_bfd_section) &&
> >         s->addr <= pc && pc < s->endaddr)
> >       return (s);
> > 
> >   return (NULL);
> > }
> > 
> > s->addr and s->endaddr came from BFD with sign extension. But `pc' is
> > not, which has the bit 31 set. All of them have the type of CORE_ADDR.
> > Any suggestions? I am not sure if it is the only problem in gdb.
> 
> PC should be already be sign extended at this point... in my tests, it
> is.

The gdb I checked out from the 5.1 branch yesterday doesn't do it. BTW,
what

(gdb) print printk

# gdb yourgdb
.....
(top-gdb) print sizeof (CORE_ADDR)

say?


H.J.




H.J.


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