aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ldebug.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/ldebug.c b/ldebug.c
index 754efe1f..39b27810 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 1.143 2002/12/11 12:34:22 roberto Exp roberto $ 2** $Id: ldebug.c,v 1.144 2003/02/11 10:46:24 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*/
@@ -451,8 +451,9 @@ static const char *getobjname (CallInfo *ci, int stackpos, const char **name) {
451 lua_assert(pc != -1); 451 lua_assert(pc != -1);
452 switch (GET_OPCODE(i)) { 452 switch (GET_OPCODE(i)) {
453 case OP_GETGLOBAL: { 453 case OP_GETGLOBAL: {
454 lua_assert(ttisstring(&p->k[GETARG_Bx(i)])); 454 int g = GETARG_Bx(i); /* global index */
455 *name = svalue(&p->k[GETARG_Bx(i)]); 455 lua_assert(ttisstring(&p->k[g]));
456 *name = svalue(&p->k[g]);
456 return "global"; 457 return "global";
457 } 458 }
458 case OP_MOVE: { 459 case OP_MOVE: {
@@ -463,11 +464,13 @@ static const char *getobjname (CallInfo *ci, int stackpos, const char **name) {
463 break; 464 break;
464 } 465 }
465 case OP_GETTABLE: { 466 case OP_GETTABLE: {
466 *name = kname(p, GETARG_C(i)); 467 int k = GETARG_C(i); /* key index */
468 *name = kname(p, k);
467 return "field"; 469 return "field";
468 } 470 }
469 case OP_SELF: { 471 case OP_SELF: {
470 *name = kname(p, GETARG_C(i)); 472 int k = GETARG_C(i); /* key index */
473 *name = kname(p, k);
471 return "method"; 474 return "method";
472 } 475 }
473 default: break; 476 default: break;