On 28/09/2019 23:52, Ozz Nixon wrote:
It's a CDECL thing... :-(
Disabled Using_CDECL, and now the pointer passes to/from the imported
functions. (Florian/Jonas/Michael - is this an expected issue on Windows?)
[clip]
By default, Windows uses stdcall calling convention when calling
externally d
I agree - but it is over 2 million lines of code. And disabling CDECL on
the windows build of my compiler/interpreter, fixed the issue.
Now, my only problem is when I run the compiler with no parameter it
returns back to C:> with a trailing letter. If I trace in FPC.EXE, it does
not produce this s
Ozz Nixon schrieb am Sa., 28. Sep. 2019, 22:53:
> It's a CDECL thing... :-(
>
> Disabled Using_CDECL, and now the pointer passes to/from the imported
> functions. (Florian/Jonas/Michael - is this an expected issue on Windows?)
>
It would help if you'd provide a self contained example that demons
It's a CDECL thing... :-(
Disabled Using_CDECL, and now the pointer passes to/from the imported
functions. (Florian/Jonas/Michael - is this an expected issue on Windows?)
On Sat, Sep 28, 2019 at 3:24 PM Ozz Nixon wrote:
> Alexander, Its the calling line that is messing up.
>
> TLapeImportedFunc
Alexander, Its the calling line that is messing up.
TLapeImportedFunc(Ptr)(@Stack[StackPos - ParamSize], Res);
* Res has a value before executing that line. However, the called method
receives the 2nd param as null.
Or is it in the definition:
TLapeImportedFunc = procedure(const Params: PParamAr
This is 2 decade of development (and for 19 years worked flawlessly) - and
in the last 6 months, the windows build is broken. Not sure if it is a
3.0.4 FPC issue, or, a change in the 3.x builds - that I am unaware of.
On Sat, Sep 28, 2019 at 3:19 PM Alexander Grotewohl
wrote:
> or maybe don't u
or maybe don't use the variable name "result" because it might point to the special delphi "result" var and not yours?--Alexander Grotewohlhttp://dcclost.comOn Sep 28, 2019 4:15 PM, Alexander Grotewohl wrote:don't know off the top of my head but does the ord() bit segfault without assigning it to
don't know off the top of my head but does the ord() bit segfault without assigning it to anything? like if the function only had writleln(ord())! or does the result:= section segfault using ord() without the pointers?my guess is it works on linux/mac purely by luck. but i could be wrong.--Alexande
[image: image.png]
Okay, getting better at FPC.EXE debugging... it appears, that 3.0.4 (or
Windows) passing a Const Pointer is handled differently?
* The bottom grey line - shows RES = xD9020, however, the
LapeOrdChar(show's it's 2nd parameter as 0x0 instead of xD9020). I was
originally focusing o
[image: image.png]
When I evaluate the code - it is perfect. However, when I run the code, it
raises a SIGSEGV - Segmentation fault. Yet, the code runs perfectly on
Linux 64bit machine, and Mac 32bit.
___
fpc-devel maillist - fpc-devel@lists.freepascal
10 matches
Mail list logo