[patch] BIG_ENDIAN -> BFD_ENDIAN_BIG

Andrew Cagney ac131313@cygnus.com
Sun Dec 16 17:30:00 GMT 2001


Just FYI,

> Hello,
> 
> I'm curious.  Why/how did BFD_ENDIAN_BIG come to be first in the enum:
> 
> enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
> 
> This has the (intended?) effect of memset(0) setting a value to BFD_ENDIAN_BIG where as code using the common host dependant BIG_ENDIAN / LITTLE_ENDIAN would have treated such a value as undefined.
> 
> GDB, which is trying to eliminate its dependance on those host dependant macros is suffering minor heart burn as a result of the difference - it has been assuming that ZERO indicated an uninitialized (roughly BFD_ENDIAN_UNKNOWN) value.
> 
>     Andrew
> 




More information about the Gdb-patches mailing list