Changeset: ae734587aca1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ae734587aca1
Modified Files:
monetdb5/mal/mal_instruction.mx
Branch: default
Log Message:
Cleanup display of values for debugging and tracing
diffs (59 lines):
diff --git a/monetdb5/mal/mal_instruction.mx b/monetdb5/mal/mal_instruction.mx
--- a/monetdb5/mal/mal_instruction.mx
+++ b/monetdb5/mal/mal_instruction.mx
@@ -1712,6 +1712,10 @@
ValPtr vr;
str msg;
+ if (isaBatType(type) && cst->vtype == TYPE_void){
+ cst->vtype = TYPE_bat;
+ cst->val.bval = 0;
+ } else
if (cst->vtype != type && !isaBatType(type) && !isPolyType(type)){
ValRecord vr = *cst;
int otype = cst->vtype;
@@ -2419,7 +2423,7 @@
cv = NULL;
VALformat(&cv, &stk->stk[getArg(p, i)]);
if ( cv && strlen(cv) > len - (t - s)) {
- char *ns = (char *) GDKmalloc(len =
strlen(cv) + len + 2);
+ char *ns = (char *) GDKmalloc(len =
strlen(cv) + len + 5);
*t = 0;
strcpy(ns, s);
t = ns + (t - s);
@@ -2427,6 +2431,7 @@
s = ns;
}
if ( cv && strcmp(cv,"nil") ){
+ strcat(t, "=");
strcat(t, cv);
advance(t,base,len);
if (cv)
@@ -2436,7 +2441,7 @@
snprintf(t,(len-(t-base)),"["
BUNFMT "]", BATcount(d));
advance(t,base,len);
}
- }
+ } else strcat(t, "=nil");
}
if (i < p->retc - 1)
*t++ = ',';
@@ -2510,14 +2515,14 @@
ct= (char*) GDKmalloc(1024+strlen(cv));
if (isVarUDFtype(mb, getArg(p, i)) ) {
if ( strcmp(cv,"nil") == 0)
- snprintf(ct,
1024+strlen(cv), "%s", cv);
+ snprintf(ct,
1024+strlen(cv), "=%s", cv);
else
- snprintf(ct,
1024+strlen(cv), "\"%s\"", cv);
+ snprintf(ct,
1024+strlen(cv), "=\"%s\"", cv);
} else
if ( strcmp(cv,"nil") == 0)
- snprintf(ct, 1024+strlen(cv),
"%s:%s", cv, getTypeName(getTailType(getArgType(mb,p,i))));
+ snprintf(ct, 1024+strlen(cv),
"=%s:%s", cv, getTypeName(getTailType(getArgType(mb,p,i))));
else
- snprintf(ct, 1024+strlen(cv),
"\"%s\":%s", cv, getTypeName(getTailType(getArgType(mb,p,i))));
+ snprintf(ct, 1024+strlen(cv),
"=\"%s\":%s", cv, getTypeName(getTailType(getArgType(mb,p,i))));
if( cv) GDKfree(cv);
cv= ct;
} else
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list