ret value of bfd_get_sign_extend_vma
Michael Mueller
m.mueller99@kay-mueller.de
Mon Jun 21 15:35:00 GMT 2004
Can someone explain to me what the return value of function
bfd_get_sign_extend_vma means? What the docu says is a mystery to me:
"Indicates if the target architecture "naturally" sign extends an
address. Some architectures implicitly sign extend address values when
they are converted to types larger than the size of an address. For
instance, bfd_get_start_address() will return an address sign extended
to fill a bfd_vma when this is the case."
How can an address have a sign? I think of an address as an unsigned
quantity.
I found 2 uses of bfd_get_sign_extend_vma in gdb (I'm talking of solaris
sparc 32 and 64 bit):
1) In dbxread.c, macro INTERNALIZE_SYMBOL
There it's used (among others) to read a negative offset of a local
variable to the frame pointer. This should be sign extended.
See http://sources.redhat.com/ml/gdb-patches/2004-06/msg00433.html
and http://sources.redhat.com/ml/gdb/2001-08/msg00078.html
2) In dwarfread2.c
There it's used to read addresses which have no sign.
More information about the Binutils
mailing list