ldebug.c File Reference

Go to the source code of this file.

Defines

#define ldebug_c
#define LUA_CORE
#define check(x)   if (!(x)) return 0;
#define checkjump(pt, pc)   check(0 <= pc && pc < pt->sizecode)
#define checkreg(pt, reg)   check((reg) < (pt)->maxstacksize)
#define checkopenop(pt, pc)   luaG_checkopenop((pt)->code[(pc)+1])

Functions

static const char * getfuncname (lua_State *L, CallInfo *ci, const char **name)
static int currentpc (lua_State *L, CallInfo *ci)
static int currentline (lua_State *L, CallInfo *ci)
LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count)
LUA_API lua_Hook lua_gethook (lua_State *L)
LUA_API int lua_gethookmask (lua_State *L)
LUA_API int lua_gethookcount (lua_State *L)
LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar)
static Protogetluaproto (CallInfo *ci)
static const char * findlocal (lua_State *L, CallInfo *ci, int n)
LUA_API const char * lua_getlocal (lua_State *L, const lua_Debug *ar, int n)
LUA_API const char * lua_setlocal (lua_State *L, const lua_Debug *ar, int n)
static void funcinfo (lua_Debug *ar, Closure *cl)
static void info_tailcall (lua_Debug *ar)
static void collectvalidlines (lua_State *L, Closure *f)
static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar, Closure *f, CallInfo *ci)
LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar)
static int precheck (const Proto *pt)
int luaG_checkopenop (Instruction i)
static int checkArgMode (const Proto *pt, int r, enum OpArgMask mode)
static Instruction symbexec (const Proto *pt, int lastpc, int reg)
int luaG_checkcode (const Proto *pt)
static const char * kname (Proto *p, int c)
static const char * getobjname (lua_State *L, CallInfo *ci, int stackpos, const char **name)
static int isinstack (CallInfo *ci, const TValue *o)
void luaG_typeerror (lua_State *L, const TValue *o, const char *op)
void luaG_concaterror (lua_State *L, StkId p1, StkId p2)
void luaG_aritherror (lua_State *L, const TValue *p1, const TValue *p2)
int luaG_ordererror (lua_State *L, const TValue *p1, const TValue *p2)
void luaG_errormsg (lua_State *L)
static void addinfo (lua_State *L, const char *msg)
void luaG_runerror_ok (lua_State *L, const char *fmt,...)

Define Documentation

#define check (  )     if (!(x)) return 0;
#define checkjump ( pt,
pc   )     check(0 <= pc && pc < pt->sizecode)

Definition at line 271 of file ldebug.c.

#define checkopenop ( pt,
pc   )     luaG_checkopenop((pt)->code[(pc)+1])

Definition at line 289 of file ldebug.c.

Referenced by symbexec().

#define checkreg ( pt,
reg   )     check((reg) < (pt)->maxstacksize)

Definition at line 273 of file ldebug.c.

Referenced by checkArgMode(), and symbexec().

#define ldebug_c

Definition at line 13 of file ldebug.c.

#define LUA_CORE

Definition at line 14 of file ldebug.c.


Function Documentation

static void addinfo ( lua_State L,
const char *  msg 
) [static]
static int auxgetinfo ( lua_State L,
const char *  what,
lua_Debug ar,
Closure f,
CallInfo ci 
) [static]
static int checkArgMode ( const Proto pt,
int  r,
enum OpArgMask  mode 
) [static]

Definition at line 305 of file ldebug.c.

References check, checkreg, INDEXK, ISK, OpArgK, OpArgN, OpArgR, OpArgU, and Proto::sizek.

Referenced by symbexec().

static void collectvalidlines ( lua_State L,
Closure f 
) [static]
static int currentline ( lua_State L,
CallInfo ci 
) [static]

Definition at line 45 of file ldebug.c.

References ci_func, currentpc(), and getline.

Referenced by addinfo(), and auxgetinfo().

static int currentpc ( lua_State L,
CallInfo ci 
) [static]

Definition at line 37 of file ldebug.c.

References lua_State::ci, ci_func, isLua, pcRel, lua_State::savedpc, and CallInfo::savedpc.

Referenced by currentline(), findlocal(), getfuncname(), and getobjname().

static const char* findlocal ( lua_State L,
CallInfo ci,
int  n 
) [static]
static void funcinfo ( lua_Debug ar,
Closure cl 
) [static]
static const char * getfuncname ( lua_State L,
CallInfo ci,
const char **  name 
) [static]
static Proto* getluaproto ( CallInfo ci  )  [static]

Definition at line 108 of file ldebug.c.

References ci_func, and isLua.

Referenced by addinfo(), and findlocal().

static const char* getobjname ( lua_State L,
CallInfo ci,
int  stackpos,
const char **  name 
) [static]
static void info_tailcall ( lua_Debug ar  )  [static]
static int isinstack ( CallInfo ci,
const TValue o 
) [static]

Definition at line 560 of file ldebug.c.

References CallInfo::base.

Referenced by luaG_typeerror().

static const char* kname ( Proto p,
int  c 
) [static]

Definition at line 490 of file ldebug.c.

References INDEXK, ISK, Proto::k, svalue, and ttisstring.

Referenced by getobjname().

LUA_API lua_Hook lua_gethook ( lua_State L  ) 

Definition at line 70 of file ldebug.c.

References lua_State::hook.

Referenced by db_gethook().

LUA_API int lua_gethookcount ( lua_State L  ) 

Definition at line 80 of file ldebug.c.

References lua_State::basehookcount.

Referenced by db_gethook().

LUA_API int lua_gethookmask ( lua_State L  ) 

Definition at line 75 of file ldebug.c.

References lua_State::hookmask.

Referenced by db_gethook().

LUA_API int lua_getinfo ( lua_State L,
const char *  what,
lua_Debug ar 
)
LUA_API const char* lua_getlocal ( lua_State L,
const lua_Debug ar,
int  n 
)
LUA_API int lua_getstack ( lua_State L,
int  level,
lua_Debug ar 
)
LUA_API int lua_sethook ( lua_State L,
lua_Hook  func,
int  mask,
int  count 
)

Definition at line 57 of file ldebug.c.

References lua_State::basehookcount, cast_byte, lua_State::hook, lua_State::hookmask, and resethookcount.

Referenced by db_sethook(), laction(), and lstop().

LUA_API const char* lua_setlocal ( lua_State L,
const lua_Debug ar,
int  n 
)
void luaG_aritherror ( lua_State L,
const TValue p1,
const TValue p2 
)

Definition at line 593 of file ldebug.c.

References luaG_typeerror(), and luaV_tonumber().

Referenced by Arith().

int luaG_checkcode ( const Proto pt  ) 

Definition at line 485 of file ldebug.c.

References NO_REG, Proto::sizecode, and symbexec().

Referenced by close_func(), and LoadFunction().

int luaG_checkopenop ( Instruction  i  ) 

Definition at line 291 of file ldebug.c.

References check, GET_OPCODE, GETARG_B, OP_CALL, OP_RETURN, OP_SETLIST, and OP_TAILCALL.

Referenced by luaV_execute().

void luaG_concaterror ( lua_State L,
StkId  p1,
StkId  p2 
)

Definition at line 586 of file ldebug.c.

References lua_assert, luaG_typeerror(), ttisnumber, and ttisstring.

Referenced by luaV_concat().

void luaG_errormsg ( lua_State L  ) 
int luaG_ordererror ( lua_State L,
const TValue p1,
const TValue p2 
)
void luaG_runerror_ok ( lua_State L,
const char *  fmt,
  ... 
)

Definition at line 665 of file ldebug.c.

References addinfo(), luaG_errormsg(), and luaO_pushvfstring().

void luaG_typeerror ( lua_State L,
const TValue o,
const char *  op 
)
static int precheck ( const Proto pt  )  [static]
static Instruction symbexec ( const Proto pt,
int  lastpc,
int  reg 
) [static]

ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:59 2011 by Doxygen 1.6.1