diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2014-02-04 08:15:52 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2014-02-04 08:15:52 (GMT) |
commit | dc81fd618b33c6e9c6b8fa4b9595229ce3809f01 (patch) | |
tree | 0e7bc9db1b1fd7c7438d4dad7671799e7a462763 /generic/tclExecute.c | |
parent | 9acd6848382529da76b66a3108c7cceb755dcffa (diff) | |
download | tcl-dc81fd618b33c6e9c6b8fa4b9595229ce3809f01.zip tcl-dc81fd618b33c6e9c6b8fa4b9595229ce3809f01.tar.gz tcl-dc81fd618b33c6e9c6b8fa4b9595229ce3809f01.tar.bz2 |
[971cb4f1db]: Make debugging traces less inclined to serious visual corruption
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index ac78370..89305e6 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -5905,14 +5905,34 @@ TEBCresume( trim2 = 0; } createTrimmedString: + /* + * Careful here; trim set often contains non-ASCII characters so we + * take care when printing. [Bug 971cb4f1db] + */ + +#ifdef TCL_COMPILE_DEBUG + if (traceInstructions) { + TRACE(("\"%.30s\" ", O2S(valuePtr))); + TclPrintObject(stdout, value2Ptr, 30); + printf(" => "); + } +#endif if (trim1 == 0 && trim2 == 0) { - TRACE_WITH_OBJ(("\"%.30s\" \"%.30s\" => ", - O2S(valuePtr), O2S(value2Ptr)), valuePtr); +#ifdef TCL_COMPILE_DEBUG + if (traceInstructions) { + TclPrintObject(stdout, valuePtr, 30); + printf("\n"); + } +#endif NEXT_INST_F(1, 1, 0); } else { objResultPtr = Tcl_NewStringObj(string1+trim1, length-trim1-trim2); - TRACE_WITH_OBJ(("\"%.30s\" \"%.30s\" => ", - O2S(valuePtr), O2S(value2Ptr)), objResultPtr); +#ifdef TCL_COMPILE_DEBUG + if (traceInstructions) { + TclPrintObject(stdout, objResultPtr, 30); + printf("\n"); + } +#endif NEXT_INST_F(1, 2, 1); } } |