From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Jacobowitz To: "H . J . Lu" Cc: Andrew Cagney , "Maciej W. Rozycki" , Richard Henderson , David B Anderson , gdb@sourceware.cygnus.com, binutils@sourceware.cygnus.com Subject: Re: Why does mips define elf_backend_sign_extend_vma to true? Date: Wed, 08 Aug 2001 09:53:00 -0000 Message-id: <20010808095401.B23955@nevyn.them.org> References: <20010807232102.A19636@lucon.org> <20010808072922.C26704@lucon.org> <3B7151C1.4030203@cygnus.com> <20010808080306.C26983@lucon.org> <3B71582D.4050003@cygnus.com> <20010808090249.A28467@lucon.org> X-SW-Source: 2001-08/msg00073.html 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