ldblib.c File Reference

Go to the source code of this file.

Defines

#define ldblib_c
#define LUA_LIB
#define LEVELS1   12
#define LEVELS2   10

Functions

static int db_getregistry (lua_State *L)
static int db_getmetatable (lua_State *L)
static int db_setmetatable (lua_State *L)
static int db_getfenv (lua_State *L)
static int db_setfenv (lua_State *L)
static void settabss (lua_State *L, const char *i, const char *v)
static void settabsi (lua_State *L, const char *i, int v)
static lua_Stategetthread (lua_State *L, int *arg)
static void treatstackoption (lua_State *L, lua_State *L1, const char *fname)
static int db_getinfo (lua_State *L)
static int db_getlocal (lua_State *L)
static int db_setlocal (lua_State *L)
static int auxupvalue (lua_State *L, int get)
static int db_getupvalue (lua_State *L)
static int db_setupvalue (lua_State *L)
static void hookf (lua_State *L, lua_Debug *ar)
static int makemask (const char *smask, int count)
static char * unmakemask (int mask, char *smask)
static void gethooktable (lua_State *L)
static int db_sethook (lua_State *L)
static int db_gethook (lua_State *L)
static int db_debug (lua_State *L)
static int db_errorfb (lua_State *L)
LUALIB_API int luaopen_debug (lua_State *L)

Variables

static const char KEY_HOOK = 'h'
static const luaL_Reg dblib []

Define Documentation

#define ldblib_c

Definition at line 12 of file ldblib.c.

#define LEVELS1   12

Definition at line 318 of file ldblib.c.

Referenced by db_errorfb().

#define LEVELS2   10

Definition at line 319 of file ldblib.c.

Referenced by db_errorfb().

#define LUA_LIB

Definition at line 13 of file ldblib.c.


Function Documentation

static int auxupvalue ( lua_State L,
int  get 
) [static]
static int db_debug ( lua_State L  )  [static]

Definition at line 301 of file ldblib.c.

References lua_pcall(), lua_settop(), lua_tostring, and luaL_loadbuffer().

static int db_errorfb ( lua_State L  )  [static]
static int db_getfenv ( lua_State L  )  [static]

Definition at line 47 of file ldblib.c.

References lua_getfenv().

static int db_gethook ( lua_State L  )  [static]
static int db_getinfo ( lua_State L  )  [static]
static int db_getlocal ( lua_State L  )  [static]
static int db_getmetatable ( lua_State L  )  [static]

Definition at line 28 of file ldblib.c.

References lua_getmetatable(), lua_pushnil(), and luaL_checkany().

static int db_getregistry ( lua_State L  )  [static]

Definition at line 22 of file ldblib.c.

References lua_pushvalue(), and LUA_REGISTRYINDEX.

static int db_getupvalue ( lua_State L  )  [static]

Definition at line 191 of file ldblib.c.

References auxupvalue().

static int db_setfenv ( lua_State L  )  [static]

Definition at line 53 of file ldblib.c.

References LUA_QL, lua_setfenv(), lua_settop(), LUA_TTABLE, luaL_checktype(), and luaL_error().

static int db_sethook ( lua_State L  )  [static]
static int db_setlocal ( lua_State L  )  [static]
static int db_setmetatable ( lua_State L  )  [static]
static int db_setupvalue ( lua_State L  )  [static]

Definition at line 196 of file ldblib.c.

References auxupvalue(), and luaL_checkany().

static void gethooktable ( lua_State L  )  [static]
static lua_State* getthread ( lua_State L,
int *  arg 
) [static]

Definition at line 75 of file ldblib.c.

References lua_isthread, and lua_tothread().

Referenced by db_errorfb(), db_gethook(), db_getinfo(), db_getlocal(), db_sethook(), and db_setlocal().

static void hookf ( lua_State L,
lua_Debug ar 
) [static]
LUALIB_API int luaopen_debug ( lua_State L  ) 

Definition at line 393 of file ldblib.c.

References LUA_DBLIBNAME, and luaL_register().

static int makemask ( const char *  smask,
int  count 
) [static]

Definition at line 224 of file ldblib.c.

References LUA_MASKCALL, LUA_MASKCOUNT, LUA_MASKLINE, and LUA_MASKRET.

Referenced by db_sethook().

static void settabsi ( lua_State L,
const char *  i,
int  v 
) [static]

Definition at line 69 of file ldblib.c.

References lua_pushinteger(), and lua_setfield().

Referenced by db_getinfo().

static void settabss ( lua_State L,
const char *  i,
const char *  v 
) [static]

Definition at line 63 of file ldblib.c.

References lua_pushstring(), and lua_setfield().

Referenced by db_getinfo().

static void treatstackoption ( lua_State L,
lua_State L1,
const char *  fname 
) [static]

Definition at line 87 of file ldblib.c.

References lua_pushvalue(), lua_remove(), lua_setfield(), and lua_xmove().

Referenced by db_getinfo().

static char* unmakemask ( int  mask,
char *  smask 
) [static]

Definition at line 234 of file ldblib.c.

References LUA_MASKCALL, LUA_MASKLINE, and LUA_MASKRET.

Referenced by db_gethook().


Variable Documentation

const luaL_Reg dblib[] [static]
Initial value:
 {
  {"debug", db_debug},
  {"getfenv", db_getfenv},
  {"gethook", db_gethook},
  {"getinfo", db_getinfo},
  {"getlocal", db_getlocal},
  {"getregistry", db_getregistry},
  {"getmetatable", db_getmetatable},
  {"getupvalue", db_getupvalue},
  {"setfenv", db_setfenv},
  {"sethook", db_sethook},
  {"setlocal", db_setlocal},
  {"setmetatable", db_setmetatable},
  {"setupvalue", db_setupvalue},
  {"traceback", db_errorfb},
  {NULL, NULL}
}

Definition at line 374 of file ldblib.c.

const char KEY_HOOK = 'h' [static]

Definition at line 203 of file ldblib.c.

Referenced by gethooktable(), and hookf().


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