sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
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
11#ifndef ldebug_h
12#define ldebug_h
13
14
15#include "lstate.h"
16
17
18#define pcRel(pc, p) (cast_int((pc) - (p)->code) - 1)
19
20
21/* Active Lua function (given call info) */
22#define ci_func(ci) (clLvalue(s2v((ci)->func.p)))
23
24
25#define resethookcount(L) (L->hookcount = L->basehookcount)
26
27/*
28** mark for entries in 'lineinfo' array that has absolute information in
29** 'abslineinfo' array
30*/
31#define ABSLINEINFO (-0x80)
32
33
34/*
35** MAXimum number of successive Instructions WiTHout ABSolute line
36** information. (A power of two allows fast divisions.)
37*/
38#if !defined(MAXIWTHABS)
39#define MAXIWTHABS 128
40#endif
41
42
43LUAI_FUNC int luaG_getfuncline (const Proto *f, int pc);
44LUAI_FUNC const char *luaG_findlocal (lua_State *L, CallInfo *ci, int n,
45 StkId *pos);
46LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o,
47 const char *opname);
48LUAI_FUNC l_noret luaG_callerror (lua_State *L, const TValue *o);
49LUAI_FUNC l_noret luaG_forerror (lua_State *L, const TValue *o,
50 const char *what);
51LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1,
52 const TValue *p2);
53LUAI_FUNC l_noret luaG_opinterror (lua_State *L, const TValue *p1,
54 const TValue *p2,
55 const char *msg);
56LUAI_FUNC l_noret luaG_tointerror (lua_State *L, const TValue *p1,
57 const TValue *p2);
58LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1,
59 const TValue *p2);
60LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...);
61LUAI_FUNC const char *luaG_addinfo (lua_State *L, const char *msg,
62 TString *src, int line);
63LUAI_FUNC l_noret luaG_errormsg (lua_State *L);
64LUAI_FUNC int luaG_traceexec (lua_State *L, const Instruction *pc);
65
66
67#endif