Skip to content

Instantly share code, notes, and snippets.

@jwise
jwise / Example usage
Created October 16, 2011 03:40
A few short scripts to walk through Lua tables in GDB
(gdb) lua_globals L
(gdb) lua_gettype $rv
(gdb) lua_gettable $rv "string"
Walking node part...
Value at node idx 1 Key [STRING]: string -> value type 5 @ (TValue *)0x81012cc
(gdb) lua_gettype $rv
(gdb) lua_walktable $rv
Walking array part...
Walking node part...
Value at node idx 0 Key [STRING]: sub -> value type 6 @ (TValue*)0x8100160