Closed Xottab-DUTY closed 3 years ago
I've looked into luajit engine and at the moment I don't see a clear path to support it, even in jit_off mode (probably the only mode that can be realistically supported with this style of the debugger) It seems to use naked assembly language functions that messes up Visual Studio call stack.
I want to take a look again, maybe the application will have to include some support code to help with debugger interactions. But I would not expect a solution to come soon.
Any progress?)
I have published an experimental Beta release with LuaJIT support (2.0.5 and 2.1.0 with some limitations): https://github.com/WheretIB/LuaDkmDebugger/releases/tag/v0.9.7
Feel free to install the LuaDkmDebugger.vsix and try it out. You can report issues with that version here (if it works at all). Keep in mind that LuaJIT dll has to be built with debug information (/debug) switch. It will not affect the performance since that flag doesn't disable optimizations.
I haven't done extensive testing of all supported versions and features for this release so bugs are possible.
It generally works! Little issues:
C++ -> LuaJIT -> C++
callstack, only LuaJIT -> C++
I have received a copy of S.T.A.L.K.E.R.: Call of Pripyat and I can now debug additional issues with the debugger:
Lua Script List works with an upcoming fix to the hang on lua_newstate. I will work to fix some issues before new release.
LuaJIT support has been released in https://github.com/WheretIB/LuaDkmDebugger/releases/tag/v0.9.8 and on Marketplace. Some limitations remain, but most features should be usable.
Yaay, thank you!
A small note on C++ -> Lua callstack, it's actually a C++ debugger issue in x86 (works fine in x64). I've looked at APIs that could've helped unwind the frames, but that component for C++ is made by Microsoft.
Could you look into adding support for LuaJIT, or maybe give an advice where should I start to try adding support for it?