[fpc-devel] DF64 BSD -- FPC running natively but argument address mangling prevents bootstrap

John Marino fpc-devel at marino.st
Tue Nov 18 14:58:03 CET 2014

On 11/18/2014 14:38, Jonas Maebe wrote:
> Such problems usually mean that the stat or statfs record needs
> adjustments. You can find the "stat" record definition in
> rtl/bsd/ostypes.inc. statfs is in rtl/<yourosdir>/ptypes.inc

I think you nailed it.  Actually I found an error on that file about
half an hour ago and am regenerating everything.

> This is probably an issue of gdb being confused about formal parameters.
> I think @formalpara will get you the location on the stack of that
> parameter (it's passed in a register in that case, but FPC will copy it
> back to the stack locally if you compile without optimisations), not its
> value.
> Parameter passing on x86-64 is identical for all platforms except for
> Win64, so it would be very strange if it went wrong in such a common
> routine only on your new platform.

Yeah, after finding the error above, I started wondering how accurate
gdb was being.  Will post back in a minute.


More information about the fpc-devel mailing list