1*eda14cbcSMatt Macy /* 2*eda14cbcSMatt Macy ** $Id: ldebug.h,v 2.7.1.1 2013/04/12 18:48:47 roberto Exp $ 3*eda14cbcSMatt Macy ** Auxiliary functions from Debug Interface module 4*eda14cbcSMatt Macy ** See Copyright Notice in lua.h 5*eda14cbcSMatt Macy */ 6*eda14cbcSMatt Macy 7*eda14cbcSMatt Macy #ifndef ldebug_h 8*eda14cbcSMatt Macy #define ldebug_h 9*eda14cbcSMatt Macy 10*eda14cbcSMatt Macy 11*eda14cbcSMatt Macy #include "lstate.h" 12*eda14cbcSMatt Macy 13*eda14cbcSMatt Macy 14*eda14cbcSMatt Macy #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) 15*eda14cbcSMatt Macy 16*eda14cbcSMatt Macy #define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0) 17*eda14cbcSMatt Macy 18*eda14cbcSMatt Macy #define resethookcount(L) (L->hookcount = L->basehookcount) 19*eda14cbcSMatt Macy 20*eda14cbcSMatt Macy /* Active Lua function (given call info) */ 21*eda14cbcSMatt Macy #define ci_func(ci) (clLvalue((ci)->func)) 22*eda14cbcSMatt Macy 23*eda14cbcSMatt Macy 24*eda14cbcSMatt Macy LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, 25*eda14cbcSMatt Macy const char *opname); 26*eda14cbcSMatt Macy LUAI_FUNC l_noret luaG_concaterror (lua_State *L, StkId p1, StkId p2); 27*eda14cbcSMatt Macy LUAI_FUNC l_noret luaG_aritherror (lua_State *L, const TValue *p1, 28*eda14cbcSMatt Macy const TValue *p2); 29*eda14cbcSMatt Macy LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1, 30*eda14cbcSMatt Macy const TValue *p2); 31*eda14cbcSMatt Macy LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...); 32*eda14cbcSMatt Macy LUAI_FUNC l_noret luaG_errormsg (lua_State *L); 33*eda14cbcSMatt Macy 34*eda14cbcSMatt Macy #endif 35