lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I want do dump the *full* VM state. Do I have to traverse all the
pointers, tables, etc. in lua_State (lstate.h) on a case-by-case
basis, or is there some easier way? Or do you know if there's maybe
some code for that already somewhere?

Could I make any assumptions which could simplify the dumping? For
example, maybe the blocks/pointers used in the struct are allocated
sequentially from some contiguous memory block, or something?

It would be probably enough for me to dump the state as binary, not
human readable. My higher level problem is that I want to find out
what's going wrong when building+running Lua on one somewhat esoteric
compiler + custom stdlib (the latter is the most probable culprit) --
I'd like to compare its VM state evolution with that of a regular gcc
x86 build.

I'd be grateful for help,
Thanks,
/Mateusz Czapliński.