diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-03-05 11:01:29 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-03-05 11:01:29 -0300 |
commit | c2951478741efaddd34f468fe33a40a786371a3a (patch) | |
tree | 34558f4b8a33ce5191d65c5d0af62dff67813084 /ldebug.c | |
parent | e560ac4862df81a2e84f09b2cf126d6790ff8589 (diff) | |
download | lua-c2951478741efaddd34f468fe33a40a786371a3a.tar.gz lua-c2951478741efaddd34f468fe33a40a786371a3a.tar.bz2 lua-c2951478741efaddd34f468fe33a40a786371a3a.zip |
when finding a 'name' for a function, handle the case when the function
is a for iterator
Diffstat (limited to 'ldebug.c')
-rw-r--r-- | ldebug.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 2.63 2010/01/13 16:18:25 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 2.64 2010/02/26 20:40:29 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 | */ |
@@ -373,8 +373,11 @@ static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) { | |||
373 | switch (GET_OPCODE(i)) { | 373 | switch (GET_OPCODE(i)) { |
374 | case OP_CALL: | 374 | case OP_CALL: |
375 | case OP_TAILCALL: | 375 | case OP_TAILCALL: |
376 | case OP_TFORLOOP: | ||
377 | return getobjname(L, ci, GETARG_A(i), name); | 376 | return getobjname(L, ci, GETARG_A(i), name); |
377 | case OP_TFORCALL: { | ||
378 | *name = "for iterator"; | ||
379 | return "for iterator"; | ||
380 | } | ||
378 | case OP_GETGLOBAL: | 381 | case OP_GETGLOBAL: |
379 | case OP_SELF: | 382 | case OP_SELF: |
380 | case OP_GETTABUP: | 383 | case OP_GETTABUP: |