Logic Machine Forum
C API for Lua - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: C API for Lua (/showthread.php?tid=4074)



C API for Lua - hummelsystemhaus - 01.06.2022

Hello,

i tried to use the Debug Library of lua which should be available in the standard lib.
But it seems the library is not available because I get nil.
Code:
LuaJIT 2.0.5 -- Copyright (C) 2005-2021 Mike Pall. https://luajit.org/
JIT: ON ARMv7 VFPv3 fold cse dce fwd dse narrow loop abc sink fuse
> print(debug)
nil
I tried to use a fresh compiled version of luajit and there the C API is available, but I canĀ“t use the precompiled lua modules anymore.
Code:
LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2022 Mike Pall. https://luajit.org/
JIT: ON ARMv7 VFPv3 fold cse dce fwd dse narrow loop abc sink fuse
> print(debug)
table: 0xb6f241b0
How can I use the debug library together with the precompiled modules like socket and apps ?

Thanks in advance!


RE: C API for Lua - admin - 01.06.2022

debug library is removed from LuaJIT in LM. What is your use case for this library?


RE: C API for Lua - hummelsystemhaus - 01.06.2022

(01.06.2022, 12:48)admin Wrote: debug library is removed from LuaJIT in LM. What is your use case for this library?

Thanks for the fast reply. It is for development purpose only because we use huge lua scripts in our apps and it is very comfortable to set breakpoints and view variables instead of "logging each line".


RE: C API for Lua - admin - 02.06.2022

Use at your own risk Smile
https://dl.openrb.com/pkg/luajit_2.0.5_debug_imx6.ipk