diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-09-01 10:47:31 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-09-01 10:47:31 -0300 |
commit | 2aba14b623c512f759291aeadc6309346ad93974 (patch) | |
tree | 53d2baecf0a82584268556bc4fd64d95c446e876 /ldebug.c | |
parent | 1dd8c9b6b6db5500b68a11e097c67e7a39c4f53d (diff) | |
download | lua-2aba14b623c512f759291aeadc6309346ad93974.tar.gz lua-2aba14b623c512f759291aeadc6309346ad93974.tar.bz2 lua-2aba14b623c512f759291aeadc6309346ad93974.zip |
details
Diffstat (limited to 'ldebug.c')
-rw-r--r-- | ldebug.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 2.6 2004/06/02 19:07:55 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 2.7 2004/06/29 18:49:02 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 | */ |
@@ -357,7 +357,7 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) { | |||
357 | } | 357 | } |
358 | case OP_TFORLOOP: { | 358 | case OP_TFORLOOP: { |
359 | checkreg(pt, a+5); /* space for control variables */ | 359 | checkreg(pt, a+5); /* space for control variables */ |
360 | if (reg >= a) last = pc; /* affect all registers above base */ | 360 | if (reg >= a+3) last = pc; /* affect all regs above its call base */ |
361 | break; | 361 | break; |
362 | } | 362 | } |
363 | case OP_TFORPREP: | 363 | case OP_TFORPREP: |
@@ -491,7 +491,8 @@ static const char *getfuncname (CallInfo *ci, const char **name) { | |||
491 | return NULL; /* calling function is not Lua (or is unknown) */ | 491 | return NULL; /* calling function is not Lua (or is unknown) */ |
492 | ci--; /* calling function */ | 492 | ci--; /* calling function */ |
493 | i = ci_func(ci)->l.p->code[currentpc(ci)]; | 493 | i = ci_func(ci)->l.p->code[currentpc(ci)]; |
494 | if (GET_OPCODE(i) == OP_CALL || GET_OPCODE(i) == OP_TAILCALL) | 494 | if (GET_OPCODE(i) == OP_CALL || GET_OPCODE(i) == OP_TAILCALL || |
495 | GET_OPCODE(i) == OP_TFORLOOP) | ||
495 | return getobjname(ci, GETARG_A(i), name); | 496 | return getobjname(ci, GETARG_A(i), name); |
496 | else | 497 | else |
497 | return NULL; /* no useful name can be found */ | 498 | return NULL; /* no useful name can be found */ |