MCPcopy Create free account
hub / github.com/TASEmulators/fceux / debugger_getsymboloffset

Function debugger_getsymboloffset

src/lua-engine.cpp:5041–5059  ·  view source on GitHub ↗

debugger.getsymboloffset()

Source from the content-addressed store, hash-verified

5039
5040// debugger.getsymboloffset()
5041static 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

Callers

nothing calls this directly

Calls 6

lua_typeFunction · 0.85
luaL_checkintegerFunction · 0.85
lua_pushintegerFunction · 0.85
getSymbolMethod · 0.80
getSymbolAtAnyBankMethod · 0.80
offsetMethod · 0.80

Tested by

no test coverage detected