diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-08 17:42:07 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-08 17:42:07 -0300 |
| commit | 0802a9df9e9326c5e61f0d6b69685c2c253de5f2 (patch) | |
| tree | c0f34b8fbf79694ea3d5f9d98f14680ba74a2b14 /ldebug.c | |
| parent | f90bc248b3c3c18941a96038b2a7517ad571d8b1 (diff) | |
| download | lua-0802a9df9e9326c5e61f0d6b69685c2c253de5f2.tar.gz lua-0802a9df9e9326c5e61f0d6b69685c2c253de5f2.tar.bz2 lua-0802a9df9e9326c5e61f0d6b69685c2c253de5f2.zip | |
no more options for debug information: it is always on
Diffstat (limited to 'ldebug.c')
| -rw-r--r-- | ldebug.c | 17 |
1 files changed, 5 insertions, 12 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldebug.c,v 1.28 2000/08/07 20:21:34 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 1.29 2000/08/08 18:26:05 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 | */ |
| @@ -57,13 +57,6 @@ lua_Hook lua_setlinehook (lua_State *L, lua_Hook func) { | |||
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | 59 | ||
| 60 | int lua_setdebug (lua_State *L, int debug) { | ||
| 61 | int old = L->debug; | ||
| 62 | L->debug = debug; | ||
| 63 | return old; | ||
| 64 | } | ||
| 65 | |||
| 66 | |||
| 67 | static StkId aux_stackedfunction (lua_State *L, int level, StkId top) { | 60 | static StkId aux_stackedfunction (lua_State *L, int level, StkId top) { |
| 68 | int i; | 61 | int i; |
| 69 | for (i = (top-1)-L->stack; i>=0; i--) { | 62 | for (i = (top-1)-L->stack; i>=0; i--) { |
| @@ -140,9 +133,7 @@ static int lua_currentline (StkId f) { | |||
| 140 | else { | 133 | else { |
| 141 | CallInfo *ci = infovalue(f); | 134 | CallInfo *ci = infovalue(f); |
| 142 | int *lineinfo = ci->func->f.l->lineinfo; | 135 | int *lineinfo = ci->func->f.l->lineinfo; |
| 143 | if (!lineinfo) return -1; /* no static debug information */ | 136 | return luaG_getline(lineinfo, lua_currentpc(f), 1, NULL); |
| 144 | else | ||
| 145 | return luaG_getline(lineinfo, lua_currentpc(f), 1, NULL); | ||
| 146 | } | 137 | } |
| 147 | } | 138 | } |
| 148 | 139 | ||
| @@ -382,7 +373,8 @@ static const char *getname (lua_State *L, StkId obj, const char **name) { | |||
| 382 | } | 373 | } |
| 383 | case OP_GETLOCAL: { | 374 | case OP_GETLOCAL: { |
| 384 | *name = luaF_getlocalname(p, GETARG_U(i)+1, pc); | 375 | *name = luaF_getlocalname(p, GETARG_U(i)+1, pc); |
| 385 | return (*name) ? "local" : NULL; | 376 | LUA_ASSERT(*name, "local must exist"); |
| 377 | return "local"; | ||
| 386 | } | 378 | } |
| 387 | case OP_PUSHSELF: | 379 | case OP_PUSHSELF: |
| 388 | case OP_GETDOTTED: { | 380 | case OP_GETDOTTED: { |
| @@ -418,3 +410,4 @@ void luaG_callerror (lua_State *L, StkId func) { | |||
| 418 | void luaG_indexerror (lua_State *L, StkId t) { | 410 | void luaG_indexerror (lua_State *L, StkId t) { |
| 419 | call_index_error(L, t, "index", "table"); | 411 | call_index_error(L, t, "index", "table"); |
| 420 | } | 412 | } |
| 413 | |||
