nginx-gdb-utils 调试 lua 代码问题

147 views
Skip to first unread message

weny...@126.com

unread,
Mar 3, 2016, 5:25:09 AM3/3/16
to openresty
最近在研究 nginx-gdb-utils 调试 lua 代码,可无法下断点:
(gdb) lvmst
current VM state: C code (from interpreted Lua code)
(gdb) lbt
(gdb) lb test.lua:23
Searching Lua function at test.lua:23...
failed to find Lua function matching test.lua:23在此输入代码...

env:
Linux ubuntu 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
nginx version: nginx/1.9.12
GNU gdb (GDB) 7.9
LuaJIT-2.1.0-beta1

btw:怀疑跟 luajit vm 相关,求解答

Yichun Zhang (agentzh)

unread,
Mar 3, 2016, 5:14:18 PM3/3/16
to openresty
Hello!
你的 test.lua 文件的第 23
行是啥?是函数定义的第一行吗?也许你设置错了?最好提供一个最小化的完整例子,以便我可以在我本地复现问题,否则我除了胡乱猜测,也帮不了你什么忙,呵呵。

Regards,
-agentzh

weny...@126.com

unread,
Mar 4, 2016, 1:42:11 AM3/4/16
to openresty
Hi, 已经搞定了。你的回复已经提示了我。

在 2016年3月4日星期五 UTC+8上午6:14:18,agentzh写道:
Reply all
Reply to author
Forward
0 new messages