1 /* $NetBSD: ldebug.h,v 1.1.1.1 2010/10/31 11:16:56 mbalmer Exp $ */ 2 3 /* 4 ** Id: ldebug.h,v 2.3.1.1 2007/12/27 13:02:25 roberto Exp 5 ** Auxiliary functions from Debug Interface module 6 ** See Copyright Notice in lua.h 7 */ 8 9 #ifndef ldebug_h 10 #define ldebug_h 11 12 13 #include "lstate.h" 14 15 16 #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) 17 18 #define getline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0) 19 20 #define resethookcount(L) (L->hookcount = L->basehookcount) 21 22 23 LUAI_FUNC void luaG_typeerror (lua_State *L, const TValue *o, 24 const char *opname); 25 LUAI_FUNC void luaG_concaterror (lua_State *L, StkId p1, StkId p2); 26 LUAI_FUNC void luaG_aritherror (lua_State *L, const TValue *p1, 27 const TValue *p2); 28 LUAI_FUNC int luaG_ordererror (lua_State *L, const TValue *p1, 29 const TValue *p2); 30 LUAI_FUNC void luaG_runerror (lua_State *L, const char *fmt, ...); 31 LUAI_FUNC void luaG_errormsg (lua_State *L); 32 LUAI_FUNC int luaG_checkcode (const Proto *pt); 33 LUAI_FUNC int luaG_checkopenop (Instruction i); 34 35 #endif 36