lua/luadebug.h

55 lines
1.4 KiB
C
Raw Normal View History

1995-10-17 07:12:45 -07:00
/*
2000-01-19 04:00:45 -08:00
** $Id: luadebug.h,v 1.8 1999/11/22 13:12:07 roberto Exp roberto $
1998-06-19 09:14:09 -07:00
** Debugging API
1997-09-16 12:25:59 -07:00
** See Copyright Notice in lua.h
1995-10-17 07:12:45 -07:00
*/
#ifndef luadebug_h
#define luadebug_h
1997-09-16 12:25:59 -07:00
1995-10-17 07:12:45 -07:00
#include "lua.h"
2000-01-19 04:00:45 -08:00
typedef struct lua_Dbgactreg lua_Dbgactreg; /* activation record */
typedef struct lua_Dbglocvar lua_Dbglocvar; /* local variable */
2000-01-19 04:00:45 -08:00
typedef void (*lua_Dbghook) (lua_State *L, lua_Dbgactreg *ar);
1995-10-17 07:12:45 -07:00
2000-01-19 04:00:45 -08:00
int lua_getstack (lua_State *L, int level, lua_Dbgactreg *ar);
int lua_getinfo (lua_State *L, const char *what, lua_Dbgactreg *ar);
int lua_getlocal (lua_State *L, const lua_Dbgactreg *ar, lua_Dbglocvar *v);
int lua_setlocal (lua_State *L, const lua_Dbgactreg *ar, lua_Dbglocvar *v);
int lua_setdebug (lua_State *L, int debug);
2000-01-19 04:00:45 -08:00
lua_Dbghook lua_setcallhook (lua_State *L, lua_Dbghook func);
lua_Dbghook lua_setlinehook (lua_State *L, lua_Dbghook func);
struct lua_Dbgactreg {
const char *event; /* `call', `return' */
const char *source; /* (S) */
int linedefined; /* (S) */
const char *what; /* (S) `Lua' function, `C' function, Lua `main' */
int currentline; /* (l) */
const char *name; /* (n) */
const char *namewhat; /* (n) global, tag method, local, field */
int nups; /* (u) number of upvalues */
lua_Object func; /* (f) function being executed */
/* private part */
lua_Object _func; /* active function */
};
struct lua_Dbglocvar {
int index;
const char *name;
lua_Object value;
};
1995-10-17 07:12:45 -07:00
#endif