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]

Re: Why does mips define elf_backend_sign_extend_vma to true?


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        +


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