The Battle for Wesnoth  1.17.0-dev
ldebug.h
Go to the documentation of this file.
1 /*
2 ** $Id: ldebug.h $
3 ** Auxiliary functions from Debug Interface module
4 ** See Copyright Notice in lua.h
5 */
6 
7 #ifndef ldebug_h
8 #define ldebug_h
9 
10 
11 #include "lstate.h"
12 
13 
14 #define pcRel(pc, p) (cast_int((pc) - (p)->code) - 1)
15 
16 
17 /* Active Lua function (given call info) */
18 #define ci_func(ci) (clLvalue(s2v((ci)->func)))
19 
20 
21 #define resethookcount(L) (L->hookcount = L->basehookcount)
22 
23 /*
24 ** mark for entries in 'lineinfo' array that has absolute information in
25 ** 'abslineinfo' array
26 */
27 #define ABSLINEINFO (-0x80)
28 
29 LUAI_FUNC int luaG_getfuncline (const Proto *f, int pc);
30 LUAI_FUNC const char *luaG_findlocal (lua_State *L, CallInfo *ci, int n,
31  StkId *pos);
33  const char *opname);
35  const char *what);
37  const TValue *p2);
39  const TValue *p2,
40  const char *msg);
42  const TValue *p2);
44  const TValue *p2);
45 LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...);
46 LUAI_FUNC const char *luaG_addinfo (lua_State *L, const char *msg,
47  TString *src, int line);
49 LUAI_FUNC int luaG_traceexec (lua_State *L, const Instruction *pc);
50 
51 
52 #endif
LUAI_FUNC l_noret luaG_concaterror(lua_State *L, const TValue *p1, const TValue *p2)
Definition: ldebug.cpp:706
Definition: lobject.h:530
#define LUAI_FUNC
Definition: luaconf.h:307
LUAI_FUNC int luaG_getfuncline(const Proto *f, int pc)
Definition: ldebug.cpp:87
LUAI_FUNC const char * luaG_findlocal(lua_State *L, CallInfo *ci, int n, StkId *pos)
Definition: ldebug.cpp:200
Definition: lobject.h:65
#define l_noret
Definition: llimits.h:178
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
Definition: debugger.cpp:110
LUAI_FUNC l_noret luaG_forerror(lua_State *L, const TValue *o, const char *what)
Definition: ldebug.cpp:700
LUAI_FUNC l_noret luaG_runerror(lua_State *L, const char *fmt,...)
Definition: ldebug.cpp:767
LUAI_FUNC l_noret luaG_opinterror(lua_State *L, const TValue *p1, const TValue *p2, const char *msg)
Definition: ldebug.cpp:712
LUAI_FUNC l_noret luaG_typeerror(lua_State *L, const TValue *o, const char *opname)
Definition: ldebug.cpp:694
LUAI_FUNC l_noret luaG_errormsg(lua_State *L)
Definition: ldebug.cpp:754
LUAI_FUNC l_noret luaG_ordererror(lua_State *L, const TValue *p1, const TValue *p2)
Definition: ldebug.cpp:731
#define f
LUAI_FUNC l_noret luaG_tointerror(lua_State *L, const TValue *p1, const TValue *p2)
Definition: ldebug.cpp:723
LUAI_FUNC const char * luaG_addinfo(lua_State *L, const char *msg, TString *src, int line)
Definition: ldebug.cpp:742
l_uint32 Instruction
Definition: llimits.h:194
LUAI_FUNC int luaG_traceexec(lua_State *L, const Instruction *pc)
Definition: ldebug.cpp:807
static map_location::DIRECTION n