Waldek Hebisch wrote:
What I don't understand is that gpidump.pas uses the MedCard type, which is four bytes on Mac OS X.
type GPIInt = MedCard;
where gpc.h uses HOST_WIDE_INT, which is eight bytes on Mac OS X.
typedef HOST_WIDE_INT gpi_int;
gpidump is wrong. OTOH I am slightly surprised by Mac OS X values. Such values are typical for a cross compiler running on 32-bit machine but producing 64-bit code.
They changed HOST_WIDE_INT to eight bytes because of the -mpowerpc64 switch, which can be used to produce 64-bit code even when running the OS in 32-bit mode (to use the G5 more efficient). See gcc discussions at <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13987> <http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00398.html> <http://gcc.gnu.org/ml/gcc-patches/2004-08/msg02339.html>.
Using gpidump (with an unchanged gpc-200521104) returns "invalid endianness marker".
Looks like problem with the size of GPIInt.
I changed it to LongWord, but now run into other problems with gpidump (I will have a look at that later, maybe I can produce a patch). Regards, Ariaan van Os