From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Maciej W. Rozycki" To: "H . J . Lu" Cc: Andrew Cagney , 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: Fri, 10 Aug 2001 00:47:00 -0000 Message-id: References: <20010808080306.C26983@lucon.org> X-SW-Source: 2001-08/msg00106.html On Wed, 8 Aug 2001, H . J . Lu wrote: > The problem is the 64bit BFD does the sign extension to the section > addresses which have the bit 31 set. Gdb cannot find 0x8011c530 in > those ranges. You may say oh, let's fix gdb to do > > (gdb) p printk > $1 = {int (char *)} 0xffffffff8011c530 Yep, that would mostly be the right approach, with the additional note that the sign-extended addresses need not be observed externally. All the code needs to do is to sign-extend all addresses before passing them to the 64-bit BFD core and truncate them back to 32 bits after passing them to a user's output. > I don't think it will be useful to me. I don't think I can set a break > pount at 0xffffffff8011c530. The sign extension here is only the > artifact of the 64bit BFD. My mips target is 32bit. You don't need to have top 32 bits of 64-bit internal BFD representation visible to a user. Maciej -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available +