Which is as good a time as any to ask: has somebody else already done
and shared such a thing? (I wouldn't want to duplicate effort)
Maybe not directly to-the-point, but I have written some GDB helper macros [1] which allow you to pretty-print Lua tables and show the values on the Lua stack by accessing the internals, and call Lua debug.traceback (only works during live debugging).