diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-04-17 00:39:36 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-04-17 00:39:36 +0000 |
commit | 14e3c2e47d94bc9eee44e8a5b7f8458a4dbae36d (patch) | |
tree | 70d48f5a5111d25d7fe889d305fa2790c052b9e6 /bfd/bfd-in.h | |
parent | 5aefc1ca23bd14fa7b462fea41500a7df423a515 (diff) | |
download | gdb-14e3c2e47d94bc9eee44e8a5b7f8458a4dbae36d.zip gdb-14e3c2e47d94bc9eee44e8a5b7f8458a4dbae36d.tar.gz gdb-14e3c2e47d94bc9eee44e8a5b7f8458a4dbae36d.tar.bz2 |
* libbfd.c: Add signed versions of bfd_{h_,}{get,put}_signed_<size>.
libbfd.c, libbfd-in.h: Add _do*signed*.
targets.c, all targets: Add bfd*signed*.
bfd-in.h: Add bfd_signed_vma. Add comments.
Diffstat (limited to 'bfd/bfd-in.h')
-rw-r--r-- | bfd/bfd-in.h | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index a1e00dd..3086167 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -68,20 +68,37 @@ typedef enum bfd_boolean {false, true} boolean; /* typedef off_t file_ptr; */ typedef long int file_ptr; -/* Support for different sizes of target format ints and addresses */ +/* Support for different sizes of target format ints and addresses. + If the host implements--and wants BFD to use--64-bit values, it + defines HOST_64_BIT (in BFD and in every program that calls it -- + since this affects declarations in bfd.h). */ #ifdef HOST_64_BIT -typedef HOST_64_BIT bfd_vma; -typedef HOST_64_BIT bfd_size_type; -typedef HOST_64_BIT symvalue; +typedef unsigned HOST_64_BIT bfd_vma; +typedef HOST_64_BIT bfd_signed_vma; +typedef unsigned HOST_64_BIT bfd_size_type; +typedef unsigned HOST_64_BIT symvalue; #define fprintf_vma(s,x) \ fprintf(s,"%08x%08x", uint64_typeHIGH(x), uint64_typeLOW(x)) -#else +#else /* not HOST_64_BIT. */ + +/* Represent a target address. Also used as a generic unsigned type + which is guaranteed to be big enough to hold any arithmetic types + we need to deal with. */ typedef unsigned long bfd_vma; + +/* A generic signed type which is guaranteed to be big enough to hold any + arithmetic types we need to deal with. Can be assumed to be compatible + with bfd_vma in the same way that signed and unsigned ints are compatible + (as parameters, in assignment, etc). */ +typedef long bfd_signed_vma; + typedef unsigned long symvalue; typedef unsigned long bfd_size_type; + +/* Print a bfd_vma x on stream s. */ #define fprintf_vma(s,x) fprintf(s, "%08lx", x) -#endif +#endif /* not HOST_64_BIT. */ #define printf_vma(x) fprintf_vma(stdout,x) typedef unsigned int flagword; /* 32 bits of flags */ |