I have a C++ application (for OS X) that calls lua as a scripting language. I\'m running a large number of these applications (100s) and they can run for a very long time (days
You could check out my Lua GDB helpers. It is a collection of macros that let you inspect the stack and values, and even print backtrace. Essentially what the article referenced by macs contains, in a simple-to-use package.
It provides these macros:
luastack [L]
- lists the values on the current Lua C stack.
luaprint < value > [verbose]
- Pretty-prints a TValue passed as argument. Expects a pointer to a TValue. When verbose is 1, expands tables, metatables and userdata environments.
luaprinttable < table >
- Pretty-prints a Lua Table. Expects a pointer to Table.
luavalue < index > [L]
- Dumps a single value at an index.
luatraceback [L]
- Calls debug.traceback()
. Not sure if it will work on core file though...