LuaHelper icon indicating copy to clipboard operation
LuaHelper copied to clipboard

Debugging into a loaded C library

Open jradxl opened this issue 4 years ago • 1 comments

Your breakpoint/stepping debugging support is excellent. Thank you. But I wondered if it was possible to step into a loaded C library.

For example:-

#!/usr/bin/env -S lua -W

-- Require cffi-lua, not from luaJIT
-- via LuaRocks, with LUA_CPATH set
local cffi = require("cffi")

-- Load libfoo
local mylib = cffi.load('./libfoo.so')

--Call function
local ret = mylib.getStable(mytableSCuserdata)

As I think you'll agree, your debugger steps over the Function call.

Any chance it could step in?

jradxl avatar Nov 10 '21 18:11 jradxl

It can't be achieved at present. We shielded the information containing C in the obtained stack and did not deal with it anymore. At present, we only deal with the information of Lua in the stack.

yinfei8 avatar Nov 12 '21 11:11 yinfei8