This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Why does mips define elf_backend_sign_extend_vma to true?
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.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer