diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-06 15:01:50 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-08-06 15:01:50 -0300 |
| commit | 2e38c6ae5a53cbf1a607a790460fca45ba3b9ca8 (patch) | |
| tree | cab4a74aba7ce8d38193f0bd2cc6f5e06b5b5690 | |
| parent | d3dd337fcaf286c83103e283b72b6ef52d837ba3 (diff) | |
| download | lua-2e38c6ae5a53cbf1a607a790460fca45ba3b9ca8.tar.gz lua-2e38c6ae5a53cbf1a607a790460fca45ba3b9ca8.tar.bz2 lua-2e38c6ae5a53cbf1a607a790460fca45ba3b9ca8.zip | |
`luadebug.h' content now is included in `lua.h'
| -rw-r--r-- | lauxlib.c | 3 | ||||
| -rw-r--r-- | lbaselib.c | 3 | ||||
| -rw-r--r-- | ldblib.c | 3 | ||||
| -rw-r--r-- | ldebug.c | 3 | ||||
| -rw-r--r-- | ldebug.h | 3 | ||||
| -rw-r--r-- | liolib.c | 3 | ||||
| -rw-r--r-- | lstate.h | 3 | ||||
| -rw-r--r-- | ltablib.c | 3 | ||||
| -rw-r--r-- | ltests.c | 3 | ||||
| -rw-r--r-- | lua.c | 3 | ||||
| -rw-r--r-- | lua.h | 56 | ||||
| -rw-r--r-- | luadebug.h | 57 |
12 files changed, 63 insertions, 80 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.c,v 1.80 2002/08/06 15:32:22 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.81 2002/08/06 17:26:45 roberto Exp roberto $ |
| 3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -23,7 +23,6 @@ | |||
| 23 | #include "lua.h" | 23 | #include "lua.h" |
| 24 | 24 | ||
| 25 | #include "lauxlib.h" | 25 | #include "lauxlib.h" |
| 26 | #include "luadebug.h" | ||
| 27 | 26 | ||
| 28 | 27 | ||
| 29 | /* | 28 | /* |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbaselib.c,v 1.93 2002/08/06 15:32:22 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.94 2002/08/06 17:06:56 roberto Exp roberto $ |
| 3 | ** Basic library | 3 | ** Basic library |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -14,7 +14,6 @@ | |||
| 14 | #include "lua.h" | 14 | #include "lua.h" |
| 15 | 15 | ||
| 16 | #include "lauxlib.h" | 16 | #include "lauxlib.h" |
| 17 | #include "luadebug.h" | ||
| 18 | #include "lualib.h" | 17 | #include "lualib.h" |
| 19 | 18 | ||
| 20 | 19 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldblib.c,v 1.64 2002/07/17 16:25:13 roberto Exp roberto $ | 2 | ** $Id: ldblib.c,v 1.65 2002/08/05 17:36:24 roberto Exp roberto $ |
| 3 | ** Interface from Lua to its debug API | 3 | ** Interface from Lua to its debug API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -12,7 +12,6 @@ | |||
| 12 | #include "lua.h" | 12 | #include "lua.h" |
| 13 | 13 | ||
| 14 | #include "lauxlib.h" | 14 | #include "lauxlib.h" |
| 15 | #include "luadebug.h" | ||
| 16 | #include "lualib.h" | 15 | #include "lualib.h" |
| 17 | 16 | ||
| 18 | 17 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldebug.c,v 1.126 2002/08/05 14:51:21 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 1.127 2002/08/06 15:32:22 roberto Exp roberto $ |
| 3 | ** Debug Interface | 3 | ** Debug Interface |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -21,7 +21,6 @@ | |||
| 21 | #include "lstring.h" | 21 | #include "lstring.h" |
| 22 | #include "ltable.h" | 22 | #include "ltable.h" |
| 23 | #include "ltm.h" | 23 | #include "ltm.h" |
| 24 | #include "luadebug.h" | ||
| 25 | #include "lvm.h" | 24 | #include "lvm.h" |
| 26 | 25 | ||
| 27 | 26 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldebug.h,v 1.26 2002/08/05 14:51:21 roberto Exp roberto $ | 2 | ** $Id: ldebug.h,v 1.27 2002/08/06 15:32:22 roberto Exp roberto $ |
| 3 | ** Auxiliary functions from Debug Interface module | 3 | ** Auxiliary functions from Debug Interface module |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -9,7 +9,6 @@ | |||
| 9 | 9 | ||
| 10 | 10 | ||
| 11 | #include "lstate.h" | 11 | #include "lstate.h" |
| 12 | #include "luadebug.h" | ||
| 13 | 12 | ||
| 14 | 13 | ||
| 15 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) | 14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: liolib.c,v 2.13 2002/07/12 18:54:53 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 2.14 2002/07/17 16:25:13 roberto Exp roberto $ |
| 3 | ** Standard I/O (and system) library | 3 | ** Standard I/O (and system) library |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -15,7 +15,6 @@ | |||
| 15 | #include "lua.h" | 15 | #include "lua.h" |
| 16 | 16 | ||
| 17 | #include "lauxlib.h" | 17 | #include "lauxlib.h" |
| 18 | #include "luadebug.h" | ||
| 19 | #include "lualib.h" | 18 | #include "lualib.h" |
| 20 | 19 | ||
| 21 | 20 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstate.h,v 1.90 2002/08/05 17:36:24 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 1.91 2002/08/06 15:32:22 roberto Exp roberto $ |
| 3 | ** Global State | 3 | ** Global State |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -11,7 +11,6 @@ | |||
| 11 | 11 | ||
| 12 | #include "lobject.h" | 12 | #include "lobject.h" |
| 13 | #include "ltm.h" | 13 | #include "ltm.h" |
| 14 | #include "luadebug.h" | ||
| 15 | 14 | ||
| 16 | 15 | ||
| 17 | /* | 16 | /* |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltablib.c,v 1.10 2002/07/08 16:51:20 roberto Exp roberto $ | 2 | ** $Id: ltablib.c,v 1.11 2002/08/06 17:06:56 roberto Exp roberto $ |
| 3 | ** Library for Table Manipulation | 3 | ** Library for Table Manipulation |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -10,7 +10,6 @@ | |||
| 10 | #include "lua.h" | 10 | #include "lua.h" |
| 11 | 11 | ||
| 12 | #include "lauxlib.h" | 12 | #include "lauxlib.h" |
| 13 | #include "luadebug.h" | ||
| 14 | #include "lualib.h" | 13 | #include "lualib.h" |
| 15 | 14 | ||
| 16 | 15 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 1.131 2002/08/05 14:10:10 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 1.132 2002/08/06 15:32:22 roberto Exp roberto $ |
| 3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -25,7 +25,6 @@ | |||
| 25 | #include "lstate.h" | 25 | #include "lstate.h" |
| 26 | #include "lstring.h" | 26 | #include "lstring.h" |
| 27 | #include "ltable.h" | 27 | #include "ltable.h" |
| 28 | #include "luadebug.h" | ||
| 29 | #include "lualib.h" | 28 | #include "lualib.h" |
| 30 | 29 | ||
| 31 | 30 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.c,v 1.97 2002/07/10 20:49:01 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.98 2002/08/06 15:32:22 roberto Exp roberto $ |
| 3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -13,7 +13,6 @@ | |||
| 13 | #include "lua.h" | 13 | #include "lua.h" |
| 14 | 14 | ||
| 15 | #include "lauxlib.h" | 15 | #include "lauxlib.h" |
| 16 | #include "luadebug.h" | ||
| 17 | #include "lualib.h" | 16 | #include "lualib.h" |
| 18 | 17 | ||
| 19 | 18 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.h,v 1.150 2002/08/06 17:06:56 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.151 2002/08/06 17:26:45 roberto Exp roberto $ |
| 3 | ** Lua - An Extensible Extension Language | 3 | ** Lua - An Extensible Extension Language |
| 4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil | 4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil |
| 5 | ** http://www.lua.org mailto:info@lua.org | 5 | ** http://www.lua.org mailto:info@lua.org |
| @@ -282,8 +282,6 @@ LUA_API int lua_pushupvalues (lua_State *L); | |||
| 282 | 282 | ||
| 283 | #define lua_getref(L,ref) lua_rawgeti(L, LUA_REGISTRYINDEX, ref) | 283 | #define lua_getref(L,ref) lua_rawgeti(L, LUA_REGISTRYINDEX, ref) |
| 284 | 284 | ||
| 285 | #endif | ||
| 286 | |||
| 287 | 285 | ||
| 288 | 286 | ||
| 289 | /* | 287 | /* |
| @@ -304,6 +302,56 @@ LUA_API int lua_pushupvalues (lua_State *L); | |||
| 304 | /* }====================================================================== */ | 302 | /* }====================================================================== */ |
| 305 | 303 | ||
| 306 | 304 | ||
| 305 | /* | ||
| 306 | ** {====================================================================== | ||
| 307 | ** Debug API | ||
| 308 | ** ======================================================================= | ||
| 309 | */ | ||
| 310 | |||
| 311 | typedef enum lua_Hookevent { | ||
| 312 | LUA_HOOKCALL, LUA_HOOKRET, LUA_HOOKLINE, LUA_HOOKCOUNT | ||
| 313 | } lua_Hookevent; | ||
| 314 | |||
| 315 | |||
| 316 | #define LUA_MASKCALL (2 << LUA_HOOKCALL) | ||
| 317 | #define LUA_MASKRET (2 << LUA_HOOKRET) | ||
| 318 | #define LUA_MASKLINE (2 << LUA_HOOKLINE) | ||
| 319 | #define LUA_MASKCOUNT(count) ((count) << (LUA_HOOKCOUNT+1)) | ||
| 320 | #define lua_getmaskcount(mask) ((mask) >> (LUA_HOOKCOUNT+1)) | ||
| 321 | |||
| 322 | typedef struct lua_Debug lua_Debug; /* activation record */ | ||
| 323 | |||
| 324 | typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar); | ||
| 325 | |||
| 326 | |||
| 327 | LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar); | ||
| 328 | LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar); | ||
| 329 | LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n); | ||
| 330 | LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n); | ||
| 331 | |||
| 332 | LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask); | ||
| 333 | LUA_API lua_Hook lua_gethook (lua_State *L); | ||
| 334 | LUA_API int lua_gethookmask (lua_State *L); | ||
| 335 | |||
| 336 | |||
| 337 | #define LUA_IDSIZE 60 | ||
| 338 | |||
| 339 | struct lua_Debug { | ||
| 340 | lua_Hookevent event; | ||
| 341 | const char *name; /* (n) */ | ||
| 342 | const char *namewhat; /* (n) `global', `local', `field', `method' */ | ||
| 343 | const char *what; /* (S) `Lua' function, `C' function, Lua `main' */ | ||
| 344 | const char *source; /* (S) */ | ||
| 345 | int currentline; /* (l) */ | ||
| 346 | int nups; /* (u) number of upvalues */ | ||
| 347 | int linedefined; /* (S) */ | ||
| 348 | char short_src[LUA_IDSIZE]; /* (S) */ | ||
| 349 | /* private part */ | ||
| 350 | int i_ci; /* active function */ | ||
| 351 | }; | ||
| 352 | |||
| 353 | /* }====================================================================== */ | ||
| 354 | |||
| 307 | 355 | ||
| 308 | /****************************************************************************** | 356 | /****************************************************************************** |
| 309 | * Copyright (C) 2002 Tecgraf, PUC-Rio. All rights reserved. | 357 | * Copyright (C) 2002 Tecgraf, PUC-Rio. All rights reserved. |
| @@ -328,3 +376,5 @@ LUA_API int lua_pushupvalues (lua_State *L); | |||
| 328 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 376 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 329 | ******************************************************************************/ | 377 | ******************************************************************************/ |
| 330 | 378 | ||
| 379 | |||
| 380 | #endif | ||
diff --git a/luadebug.h b/luadebug.h deleted file mode 100644 index 4a37c640..00000000 --- a/luadebug.h +++ /dev/null | |||
| @@ -1,57 +0,0 @@ | |||
| 1 | /* | ||
| 2 | ** $Id: luadebug.h,v 1.30 2002/07/08 20:22:08 roberto Exp $ | ||
| 3 | ** Debugging API | ||
| 4 | ** See Copyright Notice in lua.h | ||
| 5 | */ | ||
| 6 | |||
| 7 | |||
| 8 | #ifndef luadebug_h | ||
| 9 | #define luadebug_h | ||
| 10 | |||
| 11 | |||
| 12 | #include "lua.h" | ||
| 13 | |||
| 14 | typedef enum lua_Hookevent { | ||
| 15 | LUA_HOOKCALL, LUA_HOOKRET, LUA_HOOKLINE, LUA_HOOKCOUNT | ||
| 16 | } lua_Hookevent; | ||
| 17 | |||
| 18 | |||
| 19 | #define LUA_MASKCALL (2 << LUA_HOOKCALL) | ||
| 20 | #define LUA_MASKRET (2 << LUA_HOOKRET) | ||
| 21 | #define LUA_MASKLINE (2 << LUA_HOOKLINE) | ||
| 22 | #define LUA_MASKCOUNT(count) ((count) << (LUA_HOOKCOUNT+1)) | ||
| 23 | #define lua_getmaskcount(mask) ((mask) >> (LUA_HOOKCOUNT+1)) | ||
| 24 | |||
| 25 | typedef struct lua_Debug lua_Debug; /* activation record */ | ||
| 26 | |||
| 27 | typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar); | ||
| 28 | |||
| 29 | |||
| 30 | LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar); | ||
| 31 | LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar); | ||
| 32 | LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n); | ||
| 33 | LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n); | ||
| 34 | |||
| 35 | LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask); | ||
| 36 | LUA_API lua_Hook lua_gethook (lua_State *L); | ||
| 37 | LUA_API int lua_gethookmask (lua_State *L); | ||
| 38 | |||
| 39 | |||
| 40 | #define LUA_IDSIZE 60 | ||
| 41 | |||
| 42 | struct lua_Debug { | ||
| 43 | lua_Hookevent event; | ||
| 44 | const char *name; /* (n) */ | ||
| 45 | const char *namewhat; /* (n) `global', `local', `field', `method' */ | ||
| 46 | const char *what; /* (S) `Lua' function, `C' function, Lua `main' */ | ||
| 47 | const char *source; /* (S) */ | ||
| 48 | int currentline; /* (l) */ | ||
| 49 | int nups; /* (u) number of upvalues */ | ||
| 50 | int linedefined; /* (S) */ | ||
| 51 | char short_src[LUA_IDSIZE]; /* (S) */ | ||
| 52 | /* private part */ | ||
| 53 | int i_ci; /* active function */ | ||
| 54 | }; | ||
| 55 | |||
| 56 | |||
| 57 | #endif | ||
