2 ** Debugging and introspection.
3 ** Copyright (C) 2005-2012 Mike Pall. See Copyright Notice in luajit.h
11 typedef struct lj_Debug
{
12 /* Common fields. Must be in the same order as in lua.h. */
22 char short_src
[LUA_IDSIZE
];
24 /* Extended fields. Only valid if lj_debug_getinfo() is called with ext = 1.*/
29 LJ_FUNC cTValue
*lj_debug_frame(lua_State
*L
, int level
, int *size
);
30 LJ_FUNC BCLine LJ_FASTCALL
lj_debug_line(GCproto
*pt
, BCPos pc
);
31 LJ_FUNC
const char *lj_debug_uvname(GCproto
*pt
, uint32_t idx
);
32 LJ_FUNC
const char *lj_debug_uvnamev(cTValue
*o
, uint32_t idx
, TValue
**tvp
);
33 LJ_FUNC
const char *lj_debug_slotname(GCproto
*pt
, const BCIns
*pc
,
34 BCReg slot
, const char **name
);
35 LJ_FUNC
const char *lj_debug_funcname(lua_State
*L
, TValue
*frame
,
37 LJ_FUNC
void lj_debug_shortname(char *out
, GCstr
*str
);
38 LJ_FUNC
void lj_debug_addloc(lua_State
*L
, const char *msg
,
39 cTValue
*frame
, cTValue
*nextframe
);
40 LJ_FUNC
void lj_debug_pushloc(lua_State
*L
, GCproto
*pt
, BCPos pc
);
41 LJ_FUNC
int lj_debug_getinfo(lua_State
*L
, const char *what
, lj_Debug
*ar
,
44 /* Fixed internal variable names. */
45 #define VARNAMEDEF(_) \
46 _(FOR_IDX, "(for index)") \
47 _(FOR_STOP, "(for limit)") \
48 _(FOR_STEP, "(for step)") \
49 _(FOR_GEN, "(for generator)") \
50 _(FOR_STATE, "(for state)") \
51 _(FOR_CTL, "(for control)")
55 #define VARNAMEENUM(name, str) VARNAME_##name,
56 VARNAMEDEF(VARNAMEENUM
)