[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Monitoring function calls from C in 5.1
- From: b0bleet <b0bleet@...>
- Date: Sun, 21 Aug 2022 18:38:42 +0400
I think, Lua passes lua_State to hook function which you can get from stack target function arguments.
typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar);
On Sun, Aug 21, 2022 at 04:30:03PM +0200, Bas Groothedde wrote:
> Hi list,
> Is there a way to monitor all function calls in Lua 5.1 (Lua functions and C functions) with access to their arguments and results? I know about lua_sethook, but according to the docs there is no access to arguments or results.
> It's on Windows and I can optionally detour any API function for this, its purpose is profiling code including the influence of input and output on execution times.
> Thank you.