xref: /minix/external/mit/lua/dist/src/ldebug.h (revision 0a6a1f1d)
1 /*	$NetBSD: ldebug.h,v 1.4 2015/10/08 13:21:00 mbalmer Exp $	*/
2 
3 /*
4 ** Id: ldebug.h,v 2.14 2015/05/22 17:45:56 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 getfuncline(f,pc)	(((f)->lineinfo) ? (f)->lineinfo[pc] : -1)
19 
20 #define resethookcount(L)	(L->hookcount = L->basehookcount)
21 
22 
23 LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o,
24                                                 const char *opname);
25 LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1,
26                                                   const TValue *p2);
27 LUAI_FUNC l_noret luaG_opinterror (lua_State *L, const TValue *p1,
28                                                  const TValue *p2,
29                                                  const char *msg);
30 LUAI_FUNC l_noret luaG_tointerror (lua_State *L, const TValue *p1,
31                                                  const TValue *p2);
32 LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1,
33                                                  const TValue *p2);
34 LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...);
35 LUAI_FUNC const char *luaG_addinfo (lua_State *L, const char *msg,
36                                                   TString *src, int line);
37 LUAI_FUNC l_noret luaG_errormsg (lua_State *L);
38 LUAI_FUNC void luaG_traceexec (lua_State *L);
39 
40 
41 #endif
42