aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-08-13 15:02:36 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-08-13 15:02:36 -0300
commitff4f8fe59a2d0b44606f4564d13bb4d3b23fc460 (patch)
treebfa99cf4a256520e426a2cd398224d0b4751fbb2
parenta7c74c06b9fa05c06710ff3db1f22f68b20acbe9 (diff)
downloadlua-ff4f8fe59a2d0b44606f4564d13bb4d3b23fc460.tar.gz
lua-ff4f8fe59a2d0b44606f4564d13bb4d3b23fc460.tar.bz2
lua-ff4f8fe59a2d0b44606f4564d13bb4d3b23fc460.zip
small bug: calls to upvalues were not correctly traced
-rw-r--r--ldblib.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/ldblib.c b/ldblib.c
index af575bd7..11826e81 100644
--- a/ldblib.c
+++ b/ldblib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldblib.c,v 1.85 2004/04/30 20:13:38 roberto Exp roberto $ 2** $Id: ldblib.c,v 1.86 2004/05/31 19:27:14 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*/
@@ -303,22 +303,16 @@ static int errorfb (lua_State *L) {
303 lua_pushfstring(L, "%s:", ar.short_src); 303 lua_pushfstring(L, "%s:", ar.short_src);
304 if (ar.currentline > 0) 304 if (ar.currentline > 0)
305 lua_pushfstring(L, "%d:", ar.currentline); 305 lua_pushfstring(L, "%d:", ar.currentline);
306 switch (*ar.namewhat) { 306 if (*ar.namewhat != '\0') /* is there a name? */
307 case 'g': /* global */
308 case 'l': /* local */
309 case 'f': /* field */
310 case 'm': /* method */
311 lua_pushfstring(L, " in function `%s'", ar.name); 307 lua_pushfstring(L, " in function `%s'", ar.name);
312 break; 308 else {
313 default: { 309 if (*ar.what == 'm') /* main? */
314 if (*ar.what == 'm') /* main? */ 310 lua_pushfstring(L, " in main chunk");
315 lua_pushfstring(L, " in main chunk"); 311 else if (*ar.what == 'C' || *ar.what == 't')
316 else if (*ar.what == 'C' || *ar.what == 't') 312 lua_pushliteral(L, " ?"); /* C function or tail call */
317 lua_pushliteral(L, " ?"); /* C function or tail call */ 313 else
318 else 314 lua_pushfstring(L, " in function <%s:%d>",
319 lua_pushfstring(L, " in function <%s:%d>", 315 ar.short_src, ar.linedefined);
320 ar.short_src, ar.linedefined);
321 }
322 } 316 }
323 lua_concat(L, lua_gettop(L) - arg); 317 lua_concat(L, lua_gettop(L) - arg);
324 } 318 }