| 873 | } |
| 874 | |
| 875 | void Debugger::CheckDoString() { |
| 876 | if (!currentL) { |
| 877 | return; |
| 878 | } |
| 879 | |
| 880 | auto L = currentL; |
| 881 | |
| 882 | |
| 883 | if (!doStringList.empty()) { |
| 884 | const auto skip = skipHook; |
| 885 | skipHook = true; |
| 886 | const int t = lua_gettop(L); |
| 887 | for (const auto &code: doStringList) { |
| 888 | const int r = luaL_loadstring(L, code.c_str()); |
| 889 | if (r == LUA_OK) { |
| 890 | lua_pcall(L, 0, 0, 0); |
| 891 | } |
| 892 | lua_settop(L, t); |
| 893 | } |
| 894 | skipHook = skip; |
| 895 | assert(lua_gettop(L) == t); |
| 896 | doStringList.clear(); |
| 897 | } |
| 898 | } |
| 899 | |
| 900 | // message thread |
| 901 | bool Debugger::Eval(std::shared_ptr<EvalContext> evalContext, bool force) { |
nothing calls this directly
no test coverage detected