I think that stack traces would be much more informative if for class instances, instead of just "INSTANCE" a string representation of the
class (i.e. the output of _tostring) would be printed.
I tried with the following quick hack, and it seems to do the job
(but I have zero experience with the squirrel VM so I'm not sure it is bug free

Code: Select all
--- src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp.orig 2011-10-09 15:01:53.000000000 +0200
+++ src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp 2011-10-09 15:02:10.000000000 +0200
@@ -91,7 +91,10 @@
pf(v,_SC("[%s] CLASS\n"),name);
break;
case OT_INSTANCE:
- pf(v,_SC("[%s] INSTANCE\n"),name);
+ sq_tostring(v,-1);
+ sq_getstring(v,-1,&s);
+ pf(v,_SC("[%s] %s\n"),name,s);
+ sq_poptop(v);
break;
case OT_WEAKREF:
pf(v,_SC("[%s] WEAKREF\n"),name);