diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-11 20:50:18 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-11 20:50:18 +0200 |
commit | adcbc6f259e01a08a816d4020b1c6f7a25129154 (patch) | |
tree | ebfeed39c68ac4469bae62ff1bc10d630e648c17 /include | |
parent | 6a5ef462395c8b2e804551464bca132cddd59525 (diff) | |
download | crawler-adcbc6f259e01a08a816d4020b1c6f7a25129154.tar.gz crawler-adcbc6f259e01a08a816d4020b1c6f7a25129154.tar.bz2 |
added dumping of lua stack
Diffstat (limited to 'include')
-rwxr-xr-x | include/luaglue/LuaVM.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/luaglue/LuaVM.hpp b/include/luaglue/LuaVM.hpp index 0877468..488c810 100755 --- a/include/luaglue/LuaVM.hpp +++ b/include/luaglue/LuaVM.hpp @@ -14,17 +14,28 @@ class LuaVM LUAGLUE_DLL_VISIBLE ~LuaVM( ); LUAGLUE_DLL_VISIBLE void loadSource( const char *sourceFilename ); + LUAGLUE_DLL_VISIBLE void executeMain( ); LUAGLUE_DLL_VISIBLE void executeFunction( const std::string &f ); + LUAGLUE_DLL_VISIBLE void dumpState( ); + LUAGLUE_DLL_VISIBLE void dumpGlobals( ); + LUAGLUE_DLL_VISIBLE void dumpStack( ); + LUAGLUE_DLL_VISIBLE void fullGarbageCollect( ); + LUAGLUE_DLL_VISIBLE std::string getString( const std::string &key ); + LUAGLUE_DLL_VISIBLE bool getBoolean( const std::string &key ); LUAGLUE_DLL_VISIBLE lua_State *handle( ); private: void initialize( ); + + int findValue( const std::string &key ); + void dumpStackElement( lua_State *l, int i, int indent = 0 ); + private: lua_State *m_lua; std::string m_sourceFilename; |