LogicMachine Forum
C API for Lua - Printable Version

+- LogicMachine 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


RE: C API for Lua - codehex - 21.10.2025

(02.06.2022, 05:56)admin Wrote: Use at your own risk Smile
https://dl.openrb.com/pkg/luajit_2.0.5_debug_imx6.ipk

I also started developing my own Lua applications.

I encountered the same problem of struggling with development because debug.so did not exist. I tried downloading the package from the link, but it currently results in a 404 Not Found error.

It would be very convenient to be able to check the stacktrace when an error occurs if this were available.

Could you please redistribute it again? I use lm-24-imx6/lm5gmc-20240426.img firmware for my LogicMachine.

Thank you in advance.


RE: C API for Lua - admin - 21.10.2025

Install through System config > System > Packages > Add Package.

https://dl.openrb.com/pkg/luajit_2.0-20250724-debug_imx6.ipk
https://dl.openrb.com/pkg/luajit_2.0-20250724-debug_imx6.sig


RE: C API for Lua - codehex - 21.10.2025

(21.10.2025, 13:35)admin Wrote: Install through System config > System > Packages > Add Package.

https://dl.openrb.com/pkg/luajit_2.0-20250724-debug_imx6.ipk
https://dl.openrb.com/pkg/luajit_2.0-20250724-debug_imx6.sig

Thank you so much!