debugger.getsymboloffset()
| 5039 | |
| 5040 | // debugger.getsymboloffset() |
| 5041 | static int debugger_getsymboloffset(lua_State *L) |
| 5042 | { |
| 5043 | debugSymbol_t *sym = NULL; |
| 5044 | |
| 5045 | const char *name = luaL_checkstring(L, 1); |
| 5046 | |
| 5047 | if (lua_type(L, 2) == LUA_TNUMBER) |
| 5048 | { |
| 5049 | int bank = luaL_checkinteger(L, 2); |
| 5050 | sym = debugSymbolTable.getSymbol(bank, name); |
| 5051 | } |
| 5052 | else |
| 5053 | { |
| 5054 | sym = debugSymbolTable.getSymbolAtAnyBank(name); |
| 5055 | } |
| 5056 | |
| 5057 | lua_pushinteger(L, sym ? sym->offset() : -1); |
| 5058 | return 1; |
| 5059 | } |
| 5060 | |
| 5061 | // TAS Editor functions library |
| 5062 |
nothing calls this directly
no test coverage detected