[fpc-pascal] Lua and Freepascal and ARM
josepascual
josepascual at almudi.com
Wed Jun 20 17:26:35 CEST 2007
Hi Everyone
I have made a example with lua inside freepascal. I have test it in i386 fpc
2.1.4 with no problem
ann in ARM with fpc 2.1.4. I hav a problem:
I have tried to debug it (gdb):
(gdb)
LUATOVARIANT (L=0xdda08, INDEX=-2, result=void) at LuaUtils.pas:438
438 end;
(gdb)
438 end;
(gdb)
LUACOPYTABLE (L=0xdda08, IDXFROM=4, IDXTO=2, MTTO=3) at lua_WrapUp.pas:44
44 if CompareText(key, '__') = 1 then
(gdb)
47 tbl := IdxTo;
(gdb)
48 case lua_type(L, -1) of
(gdb)
50 cf := lua_tocfunction(L, -1);
(gdb)
51 LuaPushVariant(L, key);
(gdb)
LUAPUSHVARIANT (L=0xdda08, N=void) at LuaUtils.pas:443
443 begin
(gdb)
444 case VarType(N) of
(gdb)
450 varString :LuaPushString(L, N);
(gdb)
LUAPUSHSTRING (L=0xdda08, S=0x40213180) at LuaUtils.pas:478
478 lua_pushstring(L, PChar(S));
(gdb)
479 end;
(gdb)
LUAPUSHVARIANT (L=0xdda08, N=void) at LuaUtils.pas:464
464 end;
(gdb)
Program received signal SIGSEGV, Segmentation fault.
0x0002a550 in SYSTEM_TRY_CONCAT_FREE_CHUNK_FORWARD$PMEMCHUNK_VAR ()
(gdb)
Single stepping until exit from function
SYSTEM_TRY_CONCAT_FREE_CHUNK_FORWARD$PMEMCHUNK_VAR,
which has no line number information.
0x0002a468 in SYSTEM_CONCAT_TWO_BLOCKS$PMEMCHUNK_VAR$PMEMCHUNK_VAR ()
(gdb) bt
#0 0x0002a468 in SYSTEM_CONCAT_TWO_BLOCKS$PMEMCHUNK_VAR$PMEMCHUNK_VAR ()
#1 0x0002a560 in SYSTEM_TRY_CONCAT_FREE_CHUNK_FORWARD$PMEMCHUNK_VAR ()
1#2 0x0002a574 in SYSTEM_TRY_CONCAT_FREE_CHUNK$PMEMCHUNK_VAR$$PMEMCHUNK_VAR
()
#3 0x0002acc0 in SYSTEM_SYSFREEMEM_VAR$PMEMCHUNK_VAR$$LONGINT ()
#4 0x0002ad0c in SYSTEM_SYSFREEMEM$POINTER$$LONGINT ()
#5 0x00029ad8 in SYSTEM_FREEMEM$POINTER$$LONGINT ()
#6 0x0001cd0c in fpc_ansistr_decr_ref ()
#7 0x00081c68 in VARIANTS_SYSVARCLEARPROC$TVARDATA ()
#8 0x0002436c in SYSTEM_VARIANT_CLEAR$TVARDATA ()
#9 0x0002693c in fpc_finalize ()
#10 0x00069b0c in LUACOPYTABLE (L=0xdda08, IDXFROM=4, IDXTO=2, MTTO=3)
at lua_WrapUp.pas:67
#11 0x00069dd8 in NEW_TMYTYPE (L=0xdda08) at lua_WrapUp.pas:125
#12 0x000961bc in luaD_precall ()
#13 0x0009f084 in luaV_execute ()
#14 0x00000000 in ?? ()
========================================================================
Any suggestion?
thank you a lot,
J.P.
More information about the fpc-pascal
mailing list