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?
- To: "H . J . Lu" <hjl at lucon dot org>
- Subject: Re: Why does mips define elf_backend_sign_extend_vma to true?
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- Date: Fri, 10 Aug 2001 09:49:33 +0200 (MET DST)
- cc: Andrew Cagney <ac131313 at cygnus dot com>, Richard Henderson <rth at redhat dot com>, David B Anderson <davea at quasar dot engr dot sgi dot com>, gdb at sourceware dot cygnus dot com, binutils at sourceware dot cygnus dot com
- Organization: Technical University of Gdansk
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 +