gdb_lua
A set of custom GDB commands that are useful when working with Lua programs.
- source (gitlab)
- source (github)
- documentation
(gdb) lua type lua_type(L, 1)
lightuserdata
(gdb) lua type lua_type(L, 2)
number
(gdb) lua stack
1: 0x555555559910 nil nil
2: 0x555555559920 boolean 0
3: 0x555555559930 boolean 1
4: 0x555555559940 lightuserdata <c_obj>
5: 0x555555559950 number 42
6: 0x555555559960 number 3.1415901184082031
7: 0x555555559970 string "abc"
(gdb) lua bt
#0 cclosure 0x555555555303 <c_cl> at bt.c:27 (nupvalues: 1)
#1 cfunction 0x5555555552b9 <c_fn> at bt.c:21
#2 lclosure 0x555555561d50 bt.lua:17
(... tail calls ...)
#3 lclosure 0x55555555ff70 bt.lua:3