Attachment "iframe-tcl86.diff" to
ticket [3081184fff]
added by
andreas_kupries
2010-10-06 03:44:55.
0000: 2d 2d 2d 20 74 63 6c 38 36 2e 6f 72 69 67 2f 64 --- tcl86.orig/d
0010: 6f 63 2f 69 6e 74 65 72 70 2e 6e 09 32 30 31 30 oc/interp.n.2010
0020: 2d 31 30 2d 30 34 20 31 35 3a 34 39 3a 32 32 2e -10-04 15:49:22.
0030: 30 30 30 30 30 30 30 30 30 20 2d 30 37 30 30 0a 000000000 -0700.
0040: 2b 2b 2b 20 74 63 6c 38 36 2f 64 6f 63 2f 69 6e +++ tcl86/doc/in
0050: 74 65 72 70 2e 6e 09 32 30 31 30 2d 31 30 2d 30 terp.n.2010-10-0
0060: 34 20 31 35 3a 35 30 3a 31 39 2e 30 30 30 30 30 4 15:50:19.00000
0070: 30 30 30 30 20 2d 30 37 30 30 0a 40 40 20 2d 31 0000 -0700.@@ -1
0080: 38 36 2c 36 20 2b 31 38 36 2c 31 37 20 40 40 0a 86,6 +186,17 @@.
0090: 20 54 68 65 20 69 6e 69 74 69 61 6c 20 72 65 63 The initial rec
00a0: 75 72 73 69 6f 6e 20 6c 69 6d 69 74 20 6f 66 20 ursion limit of
00b0: 74 68 65 20 73 6c 61 76 65 20 69 6e 74 65 72 70 the slave interp
00c0: 72 65 74 65 72 20 69 73 20 73 65 74 20 74 6f 20 reter is set to
00d0: 74 68 65 0a 20 63 75 72 72 65 6e 74 20 72 65 63 the. current rec
00e0: 75 72 73 69 6f 6e 20 6c 69 6d 69 74 20 6f 66 20 ursion limit of
00f0: 69 74 73 20 70 61 72 65 6e 74 20 69 6e 74 65 72 its parent inter
0100: 70 72 65 74 65 72 2e 0a 20 2e 54 50 0a 2b 5c 66 preter.. .TP.+\f
0110: 42 69 6e 74 65 72 70 5c 66 52 20 5c 66 42 64 65 Binterp\fR \fBde
0120: 62 75 67 20 5c 66 49 70 61 74 68 5c 66 52 20 3f bug \fIpath\fR ?
0130: 5c 66 49 5c 2d 66 72 61 6d 65 5c 66 52 20 3f 5c \fI\-frame\fR ?\
0140: 66 49 62 6f 6f 6c 5c 66 52 3f 3f 0a 2b 2e 0a 2b fIbool\fR??.+..+
0150: 43 6f 6e 74 72 6f 6c 73 20 77 68 65 74 68 65 72 Controls whether
0160: 20 66 72 61 6d 65 2d 6c 65 76 65 6c 20 73 74 61 frame-level sta
0170: 63 6b 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 ck information i
0180: 73 20 63 61 70 74 75 72 65 64 20 69 6e 20 74 68 s captured in th
0190: 65 0a 2b 73 6c 61 76 65 20 69 6e 74 65 72 70 72 e.+slave interpr
01a0: 65 74 65 72 20 69 64 65 6e 74 69 66 69 65 64 20 eter identified
01b0: 62 79 20 5c 66 49 70 61 74 68 5c 66 52 2e 20 20 by \fIpath\fR.
01c0: 49 66 20 6e 6f 20 61 72 67 75 6d 65 6e 74 73 20 If no arguments
01d0: 61 72 65 0a 2b 67 69 76 65 6e 2c 20 6f 70 74 69 are.+given, opti
01e0: 6f 6e 20 61 6e 64 20 63 75 72 72 65 6e 74 20 73 on and current s
01f0: 65 74 74 69 6e 67 20 61 72 65 20 72 65 74 75 72 etting are retur
0200: 6e 65 64 2e 20 20 49 66 20 5c 66 49 5c 2d 66 72 ned. If \fI\-fr
0210: 61 6d 65 5c 66 52 0a 2b 69 73 20 67 69 76 65 6e ame\fR.+is given
0220: 2c 20 74 68 65 20 64 65 62 75 67 20 73 65 74 74 , the debug sett
0230: 69 6e 67 20 69 73 20 73 65 74 20 74 6f 20 74 68 ing is set to th
0240: 65 20 67 69 76 65 6e 20 62 6f 6f 6c 65 61 6e 20 e given boolean
0250: 69 66 20 70 72 6f 76 69 64 65 64 0a 2b 61 6e 64 if provided.+and
0260: 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 65 74 the current set
0270: 74 69 6e 67 20 69 73 20 72 65 74 75 72 6e 65 64 ting is returned
0280: 2e 0a 2b 54 68 69 73 20 6f 6e 6c 79 20 65 66 66 ..+This only eff
0290: 65 63 74 73 20 74 68 65 20 6f 75 74 70 75 74 20 ects the output
02a0: 6f 66 20 5c 66 42 69 6e 66 6f 20 66 72 61 6d 65 of \fBinfo frame
02b0: 5c 66 52 2c 20 69 6e 20 74 68 61 74 20 65 78 61 \fR, in that exa
02c0: 63 74 0a 2b 66 72 61 6d 65 2d 6c 65 76 65 6c 20 ct.+frame-level
02d0: 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 66 6f 72 20 information for
02e0: 63 6f 6d 6d 61 6e 64 20 69 6e 76 6f 63 61 74 69 command invocati
02f0: 6f 6e 20 61 74 20 74 68 65 20 62 79 74 65 63 6f on at the byteco
0300: 64 65 20 6c 65 76 65 6c 0a 2b 69 73 20 6f 6e 6c de level.+is onl
0310: 79 20 63 61 70 74 75 72 65 64 20 77 69 74 68 20 y captured with
0320: 74 68 69 73 20 73 65 74 74 69 6e 67 20 6f 6e 2e this setting on.
0330: 0a 2b 2e 54 50 0a 20 5c 66 42 69 6e 74 65 72 70 .+.TP. \fBinterp
0340: 5c 66 52 20 5c 66 42 64 65 6c 65 74 65 20 5c 66 \fR \fBdelete \f
0350: 52 3f 5c 66 49 70 61 74 68 20 2e 2e 2e 3f 5c 66 R?\fIpath ...?\f
0360: 52 0a 20 2e 0a 20 44 65 6c 65 74 65 73 20 7a 65 R. .. Deletes ze
0370: 72 6f 20 6f 72 20 6d 6f 72 65 20 69 6e 74 65 72 ro or more inter
0380: 70 72 65 74 65 72 73 20 67 69 76 65 6e 20 62 79 preters given by
0390: 20 74 68 65 20 6f 70 74 69 6f 6e 61 6c 20 5c 66 the optional \f
03a0: 49 70 61 74 68 5c 66 52 0a 2d 2d 2d 20 74 63 6c Ipath\fR.--- tcl
03b0: 38 36 2e 6f 72 69 67 2f 64 6f 63 2f 74 63 6c 76 86.orig/doc/tclv
03c0: 61 72 73 2e 6e 09 32 30 31 30 2d 31 30 2d 30 34 ars.n.2010-10-04
03d0: 20 31 35 3a 34 39 3a 32 32 2e 30 30 30 30 30 30 15:49:22.000000
03e0: 30 30 30 20 2d 30 37 30 30 0a 2b 2b 2b 20 74 63 000 -0700.+++ tc
03f0: 6c 38 36 2f 64 6f 63 2f 74 63 6c 76 61 72 73 2e l86/doc/tclvars.
0400: 6e 09 32 30 31 30 2d 31 30 2d 30 35 20 31 33 3a n.2010-10-05 13:
0410: 33 35 3a 34 31 2e 30 30 30 30 30 30 30 30 30 20 35:41.000000000
0420: 2d 30 37 30 30 0a 40 40 20 2d 31 30 31 2c 36 20 -0700.@@ -101,6
0430: 2b 31 30 31 2c 31 31 20 40 40 0a 20 2e 51 57 20 +101,11 @@. .QW
0440: 2f 0a 20 61 73 20 74 68 65 20 70 61 74 68 20 73 /. as the path s
0450: 65 70 61 72 61 74 6f 72 2c 20 72 65 67 61 72 64 eparator, regard
0460: 6c 65 73 73 20 6f 66 20 70 6c 61 74 66 6f 72 6d less of platform
0470: 2e 0a 20 54 68 69 73 20 76 61 72 69 61 62 6c 65 .. This variable
0480: 20 69 73 20 6f 6e 6c 79 20 75 73 65 64 20 77 68 is only used wh
0490: 65 6e 20 69 6e 69 74 69 61 6c 69 7a 69 6e 67 20 en initializing
04a0: 74 68 65 20 5c 66 42 61 75 74 6f 5f 70 61 74 68 the \fBauto_path
04b0: 5c 66 52 20 76 61 72 69 61 62 6c 65 2e 0a 2b 2e \fR variable..+.
04c0: 54 50 0a 2b 5c 66 42 65 6e 76 28 54 43 4c 5f 49 TP.+\fBenv(TCL_I
04d0: 4e 54 45 52 50 5f 44 45 42 55 47 5f 46 52 41 4d NTERP_DEBUG_FRAM
04e0: 45 29 5c 66 52 0a 2b 2e 0a 2b 49 66 20 65 78 69 E)\fR.+..+If exi
04f0: 73 74 69 6e 67 2c 20 69 74 20 68 61 73 20 74 68 sting, it has th
0500: 65 20 73 61 6d 65 20 65 66 66 65 63 74 20 61 73 e same effect as
0510: 20 72 75 6e 6e 69 6e 67 20 5c 66 42 69 6e 74 65 running \fBinte
0520: 72 70 20 64 65 62 75 67 20 7b 7d 20 2d 66 72 61 rp debug {} -fra
0530: 6d 65 20 31 5c 66 52 0a 2b 61 73 20 74 68 65 20 me 1\fR.+as the
0540: 76 65 72 79 20 66 69 72 73 74 20 63 6f 6d 6d 61 very first comma
0550: 6e 64 20 6f 66 20 65 61 63 68 20 6e 65 77 20 54 nd of each new T
0560: 63 6c 20 69 6e 74 65 72 70 72 65 74 65 72 2e 0a cl interpreter..
0570: 20 2e 52 45 0a 20 2e 54 50 0a 20 5c 66 42 65 72 .RE. .TP. \fBer
0580: 72 6f 72 43 6f 64 65 5c 66 52 0a 2d 2d 2d 20 74 rorCode\fR.--- t
0590: 63 6c 38 36 2e 6f 72 69 67 2f 67 65 6e 65 72 69 cl86.orig/generi
05a0: 63 2f 74 63 6c 42 61 73 69 63 2e 63 09 32 30 31 c/tclBasic.c.201
05b0: 30 2d 31 30 2d 30 34 20 31 35 3a 34 39 3a 32 32 0-10-04 15:49:22
05c0: 2e 30 30 30 30 30 30 30 30 30 20 2d 30 37 30 30 .000000000 -0700
05d0: 0a 2b 2b 2b 20 74 63 6c 38 36 2f 67 65 6e 65 72 .+++ tcl86/gener
05e0: 69 63 2f 74 63 6c 42 61 73 69 63 2e 63 09 32 30 ic/tclBasic.c.20
05f0: 31 30 2d 31 30 2d 30 35 20 31 33 3a 32 37 3a 32 10-10-05 13:27:2
0600: 34 2e 30 30 30 30 30 30 30 30 30 20 2d 30 37 30 4.000000000 -070
0610: 30 0a 40 40 20 2d 35 39 32 2c 36 20 2b 35 39 32 0.@@ -592,6 +592
0620: 2c 31 35 20 40 40 0a 20 20 20 20 20 69 50 74 72 ,15 @@. iPtr
0630: 2d 3e 72 65 73 75 6c 74 53 70 61 63 65 5b 30 5d ->resultSpace[0]
0640: 20 3d 20 30 3b 0a 20 20 20 20 20 69 50 74 72 2d = 0;. iPtr-
0650: 3e 74 68 72 65 61 64 49 64 20 3d 20 54 63 6c 5f >threadId = Tcl_
0660: 47 65 74 43 75 72 72 65 6e 74 54 68 72 65 61 64 GetCurrentThread
0670: 28 29 3b 0a 20 0a 2b 20 20 20 20 2f 2a 20 54 49 ();. .+ /* TI
0680: 50 20 23 33 37 38 20 2a 2f 0a 2b 23 69 66 64 65 P #378 */.+#ifde
0690: 66 20 54 43 4c 5f 49 4e 54 45 52 50 5f 44 45 42 f TCL_INTERP_DEB
06a0: 55 47 5f 46 52 41 4d 45 0a 2b 20 20 20 20 69 50 UG_FRAME.+ iP
06b0: 74 72 2d 3e 66 6c 61 67 73 20 7c 3d 20 49 4e 54 tr->flags |= INT
06c0: 45 52 50 5f 44 45 42 55 47 5f 46 52 41 4d 45 3b ERP_DEBUG_FRAME;
06d0: 0a 2b 23 65 6c 73 65 0a 2b 20 20 20 20 69 66 20 .+#else.+ if
06e0: 28 67 65 74 65 6e 76 28 22 54 43 4c 5f 49 4e 54 (getenv("TCL_INT
06f0: 45 52 50 5f 44 45 42 55 47 5f 46 52 41 4d 45 22 ERP_DEBUG_FRAME"
0700: 29 20 21 3d 20 4e 55 4c 4c 29 20 7b 0a 2b 20 20 ) != NULL) {.+
0710: 20 20 20 20 20 20 69 50 74 72 2d 3e 66 6c 61 67 iPtr->flag
0720: 73 20 7c 3d 20 49 4e 54 45 52 50 5f 44 45 42 55 s |= INTERP_DEBU
0730: 47 5f 46 52 41 4d 45 3b 0a 2b 20 20 20 20 7d 0a G_FRAME;.+ }.
0740: 2b 23 65 6e 64 69 66 0a 2b 0a 20 20 20 20 20 2f +#endif.+. /
0750: 2a 0a 20 20 20 20 20 20 2a 20 49 6e 69 74 69 61 *. * Initia
0760: 6c 69 73 65 20 74 68 65 20 74 61 62 6c 65 73 20 lise the tables
0770: 66 6f 72 20 76 61 72 69 61 62 6c 65 20 74 72 61 for variable tra
0780: 63 65 73 20 61 6e 64 20 73 65 61 72 63 68 65 73 ces and searches
0790: 20 2a 62 65 66 6f 72 65 2a 0a 20 20 20 20 20 20 *before*.
07a0: 2a 20 63 72 65 61 74 69 6e 67 20 74 68 65 20 67 * creating the g
07b0: 6c 6f 62 61 6c 20 6e 73 20 2d 20 73 6f 20 74 68 lobal ns - so th
07c0: 61 74 20 74 68 65 20 74 72 61 63 65 20 6f 6e 20 at the trace on
07d0: 65 72 72 6f 72 49 6e 66 6f 20 63 61 6e 20 62 65 errorInfo can be
07e0: 0a 2d 2d 2d 20 74 63 6c 38 36 2e 6f 72 69 67 2f .--- tcl86.orig/
07f0: 67 65 6e 65 72 69 63 2f 74 63 6c 45 78 65 63 75 generic/tclExecu
0800: 74 65 2e 63 09 32 30 31 30 2d 31 30 2d 30 34 20 te.c.2010-10-04
0810: 31 35 3a 34 39 3a 32 32 2e 30 30 30 30 30 30 30 15:49:22.0000000
0820: 30 30 20 2d 30 37 30 30 0a 2b 2b 2b 20 74 63 6c 00 -0700.+++ tcl
0830: 38 36 2f 67 65 6e 65 72 69 63 2f 74 63 6c 45 78 86/generic/tclEx
0840: 65 63 75 74 65 2e 63 09 32 30 31 30 2d 31 30 2d ecute.c.2010-10-
0850: 30 34 20 31 35 3a 35 30 3a 31 39 2e 30 30 30 30 04 15:50:19.0000
0860: 30 30 30 30 30 20 2d 30 37 30 30 0a 40 40 20 2d 00000 -0700.@@ -
0870: 32 30 37 36 2c 37 20 2b 32 30 37 36 2c 39 20 40 2076,7 +2076,9 @
0880: 40 0a 20 09 4e 52 45 5f 41 53 53 45 52 54 28 69 @. .NRE_ASSERT(i
0890: 50 74 72 2d 3e 63 6d 64 46 72 61 6d 65 50 74 72 Ptr->cmdFramePtr
08a0: 20 3d 3d 20 62 63 46 72 61 6d 65 50 74 72 29 3b == bcFramePtr);
08b0: 0a 20 09 4e 52 45 5f 41 53 53 45 52 54 28 54 4f . .NRE_ASSERT(TO
08c0: 50 5f 43 42 28 69 6e 74 65 72 70 29 2d 3e 70 72 P_CB(interp)->pr
08d0: 6f 63 50 74 72 20 3d 3d 20 54 45 42 43 72 65 74 ocPtr == TEBCret
08e0: 75 72 6e 29 3b 0a 20 09 69 50 74 72 2d 3e 63 6d urn);. .iPtr->cm
08f0: 64 46 72 61 6d 65 50 74 72 20 3d 20 62 63 46 72 dFramePtr = bcFr
0900: 61 6d 65 50 74 72 2d 3e 6e 65 78 74 50 74 72 3b amePtr->nextPtr;
0910: 0a 2b 09 69 66 20 28 69 50 74 72 2d 3e 66 6c 61 .+.if (iPtr->fla
0920: 67 73 20 26 20 49 4e 54 45 52 50 5f 44 45 42 55 gs & INTERP_DEBU
0930: 47 5f 46 52 41 4d 45 29 20 7b 0a 20 09 54 63 6c G_FRAME) {. .Tcl
0940: 41 72 67 75 6d 65 6e 74 42 43 52 65 6c 65 61 73 ArgumentBCReleas
0950: 65 28 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 29 e((Tcl_Interp *)
0960: 20 69 50 74 72 2c 20 62 63 46 72 61 6d 65 50 74 iPtr, bcFramePt
0970: 72 29 3b 0a 2b 09 7d 0a 20 09 69 66 20 28 63 6f r);.+.}. .if (co
0980: 64 65 50 74 72 2d 3e 66 6c 61 67 73 20 26 20 54 dePtr->flags & T
0990: 43 4c 5f 42 59 54 45 43 4f 44 45 5f 52 45 43 4f CL_BYTECODE_RECO
09a0: 4d 50 49 4c 45 29 20 7b 0a 20 09 20 20 20 20 69 MPILE) {. . i
09b0: 50 74 72 2d 3e 66 6c 61 67 73 20 7c 3d 20 45 52 Ptr->flags |= ER
09c0: 52 5f 41 4c 52 45 41 44 59 5f 4c 4f 47 47 45 44 R_ALREADY_LOGGED
09d0: 3b 0a 20 09 20 20 20 20 63 6f 64 65 50 74 72 2d ;. . codePtr-
09e0: 3e 66 6c 61 67 73 20 26 3d 20 7e 54 43 4c 5f 42 >flags &= ~TCL_B
09f0: 59 54 45 43 4f 44 45 5f 52 45 43 4f 4d 50 49 4c YTECODE_RECOMPIL
0a00: 45 3b 0a 40 40 20 2d 32 37 35 33 2c 38 20 2b 32 E;.@@ -2753,8 +2
0a10: 37 35 35 2c 31 30 20 40 40 0a 20 09 62 63 46 72 755,10 @@. .bcFr
0a20: 61 6d 65 50 74 72 2d 3e 64 61 74 61 2e 74 65 62 amePtr->data.teb
0a30: 63 2e 70 63 20 3d 20 28 63 68 61 72 20 2a 29 20 c.pc = (char *)
0a40: 70 63 3b 0a 20 09 69 50 74 72 2d 3e 63 6d 64 46 pc;. .iPtr->cmdF
0a50: 72 61 6d 65 50 74 72 20 3d 20 62 63 46 72 61 6d ramePtr = bcFram
0a60: 65 50 74 72 3b 0a 20 0a 2b 09 69 66 20 28 69 50 ePtr;. .+.if (iP
0a70: 74 72 2d 3e 66 6c 61 67 73 20 26 20 49 4e 54 45 tr->flags & INTE
0a80: 52 50 5f 44 45 42 55 47 5f 46 52 41 4d 45 29 20 RP_DEBUG_FRAME)
0a90: 7b 0a 20 09 54 63 6c 41 72 67 75 6d 65 6e 74 42 {. .TclArgumentB
0aa0: 43 45 6e 74 65 72 28 28 54 63 6c 5f 49 6e 74 65 CEnter((Tcl_Inte
0ab0: 72 70 20 2a 29 20 69 50 74 72 2c 20 6f 62 6a 76 rp *) iPtr, objv
0ac0: 2c 20 6f 62 6a 63 2c 0a 20 09 09 63 6f 64 65 50 , objc,. ..codeP
0ad0: 74 72 2c 20 62 63 46 72 61 6d 65 50 74 72 2c 20 tr, bcFramePtr,
0ae0: 70 63 20 2d 20 63 6f 64 65 50 74 72 2d 3e 63 6f pc - codePtr->co
0af0: 64 65 53 74 61 72 74 29 3b 0a 2b 09 7d 0a 20 0a deStart);.+.}. .
0b00: 20 09 44 45 43 41 43 48 45 5f 53 54 41 43 4b 5f .DECACHE_STACK_
0b10: 49 4e 46 4f 28 29 3b 0a 20 0a 2d 2d 2d 20 74 63 INFO();. .--- tc
0b20: 6c 38 36 2e 6f 72 69 67 2f 67 65 6e 65 72 69 63 l86.orig/generic
0b30: 2f 74 63 6c 49 6e 74 65 72 70 2e 63 09 32 30 31 /tclInterp.c.201
0b40: 30 2d 31 30 2d 30 34 20 31 35 3a 34 39 3a 32 32 0-10-04 15:49:22
0b50: 2e 30 30 30 30 30 30 30 30 30 20 2d 30 37 30 30 .000000000 -0700
0b60: 0a 2b 2b 2b 20 74 63 6c 38 36 2f 67 65 6e 65 72 .+++ tcl86/gener
0b70: 69 63 2f 74 63 6c 49 6e 74 65 72 70 2e 63 09 32 ic/tclInterp.c.2
0b80: 30 31 30 2d 31 30 2d 30 35 20 31 33 3a 32 38 3a 010-10-05 13:28:
0b90: 32 32 2e 30 30 30 30 30 30 30 30 30 20 2d 30 37 22.000000000 -07
0ba0: 30 30 0a 40 40 20 2d 32 31 30 2c 36 20 2b 32 31 00.@@ -210,6 +21
0bb0: 30 2c 39 20 40 40 0a 20 09 09 09 20 20 20 20 54 0,9 @@. ... T
0bc0: 63 6c 5f 4f 62 6a 20 2a 63 6f 6e 73 74 20 6f 62 cl_Obj *const ob
0bd0: 6a 76 5b 5d 29 3b 0a 20 73 74 61 74 69 63 20 54 jv[]);. static T
0be0: 63 6c 5f 49 6e 74 65 72 70 20 2a 09 53 6c 61 76 cl_Interp *.Slav
0bf0: 65 43 72 65 61 74 65 28 54 63 6c 5f 49 6e 74 65 eCreate(Tcl_Inte
0c00: 72 70 20 2a 69 6e 74 65 72 70 2c 20 54 63 6c 5f rp *interp, Tcl_
0c10: 4f 62 6a 20 2a 70 61 74 68 50 74 72 2c 0a 20 09 Obj *pathPtr,. .
0c20: 09 09 20 20 20 20 69 6e 74 20 73 61 66 65 29 3b .. int safe);
0c30: 0a 2b 73 74 61 74 69 63 20 69 6e 74 09 09 53 6c .+static int..Sl
0c40: 61 76 65 44 65 62 75 67 43 6d 64 28 54 63 6c 5f aveDebugCmd(Tcl_
0c50: 49 6e 74 65 72 70 20 2a 69 6e 74 65 72 70 2c 0a Interp *interp,.
0c60: 2b 09 09 09 20 20 20 20 54 63 6c 5f 49 6e 74 65 +... Tcl_Inte
0c70: 72 70 20 2a 73 6c 61 76 65 49 6e 74 65 72 70 2c rp *slaveInterp,
0c80: 0a 2b 09 09 09 20 20 20 20 69 6e 74 20 6f 62 6a .+... int obj
0c90: 63 2c 20 54 63 6c 5f 4f 62 6a 20 2a 63 6f 6e 73 c, Tcl_Obj *cons
0ca0: 74 20 6f 62 6a 76 5b 5d 29 3b 0a 20 73 74 61 74 t objv[]);. stat
0cb0: 69 63 20 69 6e 74 09 09 53 6c 61 76 65 45 76 61 ic int..SlaveEva
0cc0: 6c 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e l(Tcl_Interp *in
0cd0: 74 65 72 70 2c 20 54 63 6c 5f 49 6e 74 65 72 70 terp, Tcl_Interp
0ce0: 20 2a 73 6c 61 76 65 49 6e 74 65 72 70 2c 0a 20 *slaveInterp,.
0cf0: 09 09 09 20 20 20 20 69 6e 74 20 6f 62 6a 63 2c ... int objc,
0d00: 20 54 63 6c 5f 4f 62 6a 20 2a 63 6f 6e 73 74 20 Tcl_Obj *const
0d10: 6f 62 6a 76 5b 5d 29 3b 0a 20 73 74 61 74 69 63 objv[]);. static
0d20: 20 69 6e 74 09 09 53 6c 61 76 65 45 78 70 6f 73 int..SlaveExpos
0d30: 65 28 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e e(Tcl_Interp *in
0d40: 74 65 72 70 2c 0a 40 40 20 2d 35 36 31 2c 31 36 terp,.@@ -561,16
0d50: 20 2b 35 36 34 2c 31 38 20 40 40 0a 20 20 20 20 +564,18 @@.
0d60: 20 69 6e 74 20 69 6e 64 65 78 3b 0a 20 20 20 20 int index;.
0d70: 20 73 74 61 74 69 63 20 63 6f 6e 73 74 20 63 68 static const ch
0d80: 61 72 20 2a 63 6f 6e 73 74 20 6f 70 74 69 6f 6e ar *const option
0d90: 73 5b 5d 20 3d 20 7b 0a 20 09 22 61 6c 69 61 73 s[] = {. ."alias
0da0: 22 2c 09 22 61 6c 69 61 73 65 73 22 2c 09 22 62 ",."aliases",."b
0db0: 67 65 72 72 6f 72 22 2c 09 22 63 61 6e 63 65 6c gerror",."cancel
0dc0: 22 2c 0a 2d 09 22 63 72 65 61 74 65 22 2c 09 22 ",.-."create",."
0dd0: 64 65 6c 65 74 65 22 2c 09 22 65 76 61 6c 22 2c delete",."eval",
0de0: 09 09 22 65 78 69 73 74 73 22 2c 0a 2d 09 22 65 .."exists",.-."e
0df0: 78 70 6f 73 65 22 2c 09 22 68 69 64 65 22 2c 09 xpose",."hide",.
0e00: 09 22 68 69 64 64 65 6e 22 2c 09 22 69 73 73 61 ."hidden",."issa
0e10: 66 65 22 2c 0a 2b 09 22 63 72 65 61 74 65 22 2c fe",.+."create",
0e20: 09 22 64 65 62 75 67 22 2c 09 22 64 65 6c 65 74 ."debug",."delet
0e30: 65 22 2c 0a 2b 09 22 65 76 61 6c 22 2c 09 09 22 e",.+."eval",.."
0e40: 65 78 69 73 74 73 22 2c 09 22 65 78 70 6f 73 65 exists",."expose
0e50: 22 2c 0a 2b 09 22 68 69 64 65 22 2c 09 09 22 68 ",.+."hide",.."h
0e60: 69 64 64 65 6e 22 2c 09 22 69 73 73 61 66 65 22 idden",."issafe"
0e70: 2c 0a 20 09 22 69 6e 76 6f 6b 65 68 69 64 64 65 ,. ."invokehidde
0e80: 6e 22 2c 09 22 6c 69 6d 69 74 22 2c 09 22 6d 61 n",."limit",."ma
0e90: 72 6b 74 72 75 73 74 65 64 22 2c 09 22 72 65 63 rktrusted",."rec
0ea0: 75 72 73 69 6f 6e 6c 69 6d 69 74 22 2c 0a 20 09 ursionlimit",. .
0eb0: 22 73 6c 61 76 65 73 22 2c 09 22 73 68 61 72 65 "slaves",."share
0ec0: 22 2c 09 22 74 61 72 67 65 74 22 2c 09 22 74 72 ",."target",."tr
0ed0: 61 6e 73 66 65 72 22 2c 0a 20 09 4e 55 4c 4c 0a ansfer",. .NULL.
0ee0: 20 20 20 20 20 7d 3b 0a 20 20 20 20 20 65 6e 75 };. enu
0ef0: 6d 20 6f 70 74 69 6f 6e 20 7b 0a 20 09 4f 50 54 m option {. .OPT
0f00: 5f 41 4c 49 41 53 2c 09 4f 50 54 5f 41 4c 49 41 _ALIAS,.OPT_ALIA
0f10: 53 45 53 2c 09 4f 50 54 5f 42 47 45 52 52 4f 52 SES,.OPT_BGERROR
0f20: 2c 09 4f 50 54 5f 43 41 4e 43 45 4c 2c 0a 2d 09 ,.OPT_CANCEL,.-.
0f30: 4f 50 54 5f 43 52 45 41 54 45 2c 09 4f 50 54 5f OPT_CREATE,.OPT_
0f40: 44 45 4c 45 54 45 2c 09 4f 50 54 5f 45 56 41 4c DELETE,.OPT_EVAL
0f50: 2c 09 4f 50 54 5f 45 58 49 53 54 53 2c 0a 2d 09 ,.OPT_EXISTS,.-.
0f60: 4f 50 54 5f 45 58 50 4f 53 45 2c 09 4f 50 54 5f OPT_EXPOSE,.OPT_
0f70: 48 49 44 45 2c 09 4f 50 54 5f 48 49 44 44 45 4e HIDE,.OPT_HIDDEN
0f80: 2c 09 4f 50 54 5f 49 53 53 41 46 45 2c 0a 2b 09 ,.OPT_ISSAFE,.+.
0f90: 4f 50 54 5f 43 52 45 41 54 45 2c 09 4f 50 54 5f OPT_CREATE,.OPT_
0fa0: 44 45 42 55 47 2c 09 4f 50 54 5f 44 45 4c 45 54 DEBUG,.OPT_DELET
0fb0: 45 2c 0a 2b 09 4f 50 54 5f 45 56 41 4c 2c 09 4f E,.+.OPT_EVAL,.O
0fc0: 50 54 5f 45 58 49 53 54 53 2c 09 4f 50 54 5f 45 PT_EXISTS,.OPT_E
0fd0: 58 50 4f 53 45 2c 0a 2b 09 4f 50 54 5f 48 49 44 XPOSE,.+.OPT_HID
0fe0: 45 2c 09 4f 50 54 5f 48 49 44 44 45 4e 2c 09 4f E,.OPT_HIDDEN,.O
0ff0: 50 54 5f 49 53 53 41 46 45 2c 0a 20 09 4f 50 54 PT_ISSAFE,. .OPT
1000: 5f 49 4e 56 4f 4b 45 48 49 44 2c 09 4f 50 54 5f _INVOKEHID,.OPT_
1010: 4c 49 4d 49 54 2c 09 4f 50 54 5f 4d 41 52 4b 54 LIMIT,.OPT_MARKT
1020: 52 55 53 54 45 44 2c 4f 50 54 5f 52 45 43 4c 49 RUSTED,OPT_RECLI
1030: 4d 49 54 2c 0a 20 09 4f 50 54 5f 53 4c 41 56 45 MIT,. .OPT_SLAVE
1040: 53 2c 09 4f 50 54 5f 53 48 41 52 45 2c 09 4f 50 S,.OPT_SHARE,.OP
1050: 54 5f 54 41 52 47 45 54 2c 09 4f 50 54 5f 54 52 T_TARGET,.OPT_TR
1060: 41 4e 53 46 45 52 0a 20 20 20 20 20 7d 3b 0a 40 ANSFER. };.@
1070: 40 20 2d 37 38 34 2c 36 20 2b 37 38 39 2c 32 33 @ -784,6 +789,23
1080: 20 40 40 0a 20 09 54 63 6c 5f 53 65 74 4f 62 6a @@. .Tcl_SetObj
1090: 52 65 73 75 6c 74 28 69 6e 74 65 72 70 2c 20 73 Result(interp, s
10a0: 6c 61 76 65 50 74 72 29 3b 0a 20 09 72 65 74 75 lavePtr);. .retu
10b0: 72 6e 20 54 43 4c 5f 4f 4b 3b 0a 20 20 20 20 20 rn TCL_OK;.
10c0: 7d 0a 2b 20 20 20 20 63 61 73 65 20 4f 50 54 5f }.+ case OPT_
10d0: 44 45 42 55 47 3a 20 7b 0a 2b 09 2f 2a 20 54 49 DEBUG: {.+./* TI
10e0: 50 20 23 33 37 38 20 2a 2f 0a 2b 09 54 63 6c 5f P #378 */.+.Tcl_
10f0: 49 6e 74 65 72 70 20 2a 73 6c 61 76 65 49 6e 74 Interp *slaveInt
1100: 65 72 70 3b 0a 2b 0a 2b 09 2f 2a 0a 2b 09 20 2a erp;.+.+./*.+. *
1110: 20 43 75 72 72 65 6e 74 6c 79 20 6f 6e 6c 79 20 Currently only
1120: 2d 66 72 61 6d 65 20 73 75 70 70 6f 72 74 65 64 -frame supported
1130: 2c 20 6f 74 68 65 72 77 69 73 65 20 3f 2d 6f 70 , otherwise ?-op
1140: 74 69 6f 6e 20 3f 76 61 6c 75 65 3f 3f 0a 2b 09 tion ?value??.+.
1150: 20 2a 2f 0a 2b 09 69 66 20 28 6f 62 6a 63 20 3c */.+.if (objc <
1160: 20 33 20 7c 7c 20 6f 62 6a 63 20 3e 20 35 29 20 3 || objc > 5)
1170: 7b 0a 2b 09 20 20 20 20 54 63 6c 5f 57 72 6f 6e {.+. Tcl_Wron
1180: 67 4e 75 6d 41 72 67 73 28 69 6e 74 65 72 70 2c gNumArgs(interp,
1190: 20 32 2c 20 6f 62 6a 76 2c 20 22 70 61 74 68 20 2, objv, "path
11a0: 3f 2d 66 72 61 6d 65 20 3f 62 6f 6f 6c 3f 3f 22 ?-frame ?bool??"
11b0: 29 3b 0a 2b 09 20 20 20 20 72 65 74 75 72 6e 20 );.+. return
11c0: 54 43 4c 5f 45 52 52 4f 52 3b 0a 2b 09 7d 0a 2b TCL_ERROR;.+.}.+
11d0: 09 73 6c 61 76 65 49 6e 74 65 72 70 20 3d 20 47 .slaveInterp = G
11e0: 65 74 49 6e 74 65 72 70 28 69 6e 74 65 72 70 2c etInterp(interp,
11f0: 20 6f 62 6a 76 5b 32 5d 29 3b 0a 2b 09 69 66 20 objv[2]);.+.if
1200: 28 73 6c 61 76 65 49 6e 74 65 72 70 20 3d 3d 20 (slaveInterp ==
1210: 4e 55 4c 4c 29 20 7b 0a 2b 09 20 20 20 20 72 65 NULL) {.+. re
1220: 74 75 72 6e 20 54 43 4c 5f 45 52 52 4f 52 3b 0a turn TCL_ERROR;.
1230: 2b 09 7d 0a 2b 09 72 65 74 75 72 6e 20 53 6c 61 +.}.+.return Sla
1240: 76 65 44 65 62 75 67 43 6d 64 28 69 6e 74 65 72 veDebugCmd(inter
1250: 70 2c 20 73 6c 61 76 65 49 6e 74 65 72 70 2c 20 p, slaveInterp,
1260: 6f 62 6a 63 20 2d 20 33 2c 20 6f 62 6a 76 20 2b objc - 3, objv +
1270: 20 33 29 3b 0a 2b 20 20 20 20 7d 0a 20 20 20 20 3);.+ }.
1280: 20 63 61 73 65 20 4f 50 54 5f 44 45 4c 45 54 45 case OPT_DELETE
1290: 3a 20 7b 0a 20 09 69 6e 74 20 69 3b 0a 20 09 49 : {. .int i;. .I
12a0: 6e 74 65 72 70 49 6e 66 6f 20 2a 69 69 50 74 72 nterpInfo *iiPtr
12b0: 3b 0a 40 40 20 2d 32 33 37 36 2c 31 34 20 2b 32 ;.@@ -2376,14 +2
12c0: 33 39 38 2c 31 36 20 40 40 0a 20 20 20 20 20 54 398,16 @@. T
12d0: 63 6c 5f 49 6e 74 65 72 70 20 2a 73 6c 61 76 65 cl_Interp *slave
12e0: 49 6e 74 65 72 70 20 3d 20 63 6c 69 65 6e 74 44 Interp = clientD
12f0: 61 74 61 3b 0a 20 20 20 20 20 69 6e 74 20 69 6e ata;. int in
1300: 64 65 78 3b 0a 20 20 20 20 20 73 74 61 74 69 63 dex;. static
1310: 20 63 6f 6e 73 74 20 63 68 61 72 20 2a 63 6f 6e const char *con
1320: 73 74 20 6f 70 74 69 6f 6e 73 5b 5d 20 3d 20 7b st options[] = {
1330: 0a 2d 09 22 61 6c 69 61 73 22 2c 09 22 61 6c 69 .-."alias",."ali
1340: 61 73 65 73 22 2c 09 22 62 67 65 72 72 6f 72 22 ases",."bgerror"
1350: 2c 09 22 65 76 61 6c 22 2c 0a 2d 09 22 65 78 70 ,."eval",.-."exp
1360: 6f 73 65 22 2c 09 22 68 69 64 65 22 2c 09 09 22 ose",."hide",.."
1370: 68 69 64 64 65 6e 22 2c 09 22 69 73 73 61 66 65 hidden",."issafe
1380: 22 2c 0a 2d 09 22 69 6e 76 6f 6b 65 68 69 64 64 ",.-."invokehidd
1390: 65 6e 22 2c 09 22 6c 69 6d 69 74 22 2c 09 22 6d en",."limit",."m
13a0: 61 72 6b 74 72 75 73 74 65 64 22 2c 09 22 72 65 arktrusted",."re
13b0: 63 75 72 73 69 6f 6e 6c 69 6d 69 74 22 2c 20 4e cursionlimit", N
13c0: 55 4c 4c 0a 2b 09 22 61 6c 69 61 73 22 2c 09 22 ULL.+."alias",."
13d0: 61 6c 69 61 73 65 73 22 2c 09 22 62 67 65 72 72 aliases",."bgerr
13e0: 6f 72 22 2c 09 22 64 65 62 75 67 22 2c 0a 2b 09 or",."debug",.+.
13f0: 22 65 76 61 6c 22 2c 09 09 22 65 78 70 6f 73 65 "eval",.."expose
1400: 22 2c 09 22 68 69 64 65 22 2c 09 09 22 68 69 64 ",."hide",.."hid
1410: 64 65 6e 22 2c 0a 2b 09 22 69 73 73 61 66 65 22 den",.+."issafe"
1420: 2c 09 22 69 6e 76 6f 6b 65 68 69 64 64 65 6e 22 ,."invokehidden"
1430: 2c 09 22 6c 69 6d 69 74 22 2c 09 22 6d 61 72 6b ,."limit",."mark
1440: 74 72 75 73 74 65 64 22 2c 0a 2b 09 22 72 65 63 trusted",.+."rec
1450: 75 72 73 69 6f 6e 6c 69 6d 69 74 22 2c 20 4e 55 ursionlimit", NU
1460: 4c 4c 0a 20 20 20 20 20 7d 3b 0a 20 20 20 20 20 LL. };.
1470: 65 6e 75 6d 20 6f 70 74 69 6f 6e 73 20 7b 0a 2d enum options {.-
1480: 09 4f 50 54 5f 41 4c 49 41 53 2c 09 4f 50 54 5f .OPT_ALIAS,.OPT_
1490: 41 4c 49 41 53 45 53 2c 09 4f 50 54 5f 42 47 45 ALIASES,.OPT_BGE
14a0: 52 52 4f 52 2c 09 4f 50 54 5f 45 56 41 4c 2c 0a RROR,.OPT_EVAL,.
14b0: 2d 09 4f 50 54 5f 45 58 50 4f 53 45 2c 09 4f 50 -.OPT_EXPOSE,.OP
14c0: 54 5f 48 49 44 45 2c 09 4f 50 54 5f 48 49 44 44 T_HIDE,.OPT_HIDD
14d0: 45 4e 2c 09 4f 50 54 5f 49 53 53 41 46 45 2c 0a EN,.OPT_ISSAFE,.
14e0: 2d 09 4f 50 54 5f 49 4e 56 4f 4b 45 48 49 44 44 -.OPT_INVOKEHIDD
14f0: 45 4e 2c 20 4f 50 54 5f 4c 49 4d 49 54 2c 09 4f EN, OPT_LIMIT,.O
1500: 50 54 5f 4d 41 52 4b 54 52 55 53 54 45 44 2c 20 PT_MARKTRUSTED,
1510: 4f 50 54 5f 52 45 43 4c 49 4d 49 54 0a 2b 09 4f OPT_RECLIMIT.+.O
1520: 50 54 5f 41 4c 49 41 53 2c 09 4f 50 54 5f 41 4c PT_ALIAS,.OPT_AL
1530: 49 41 53 45 53 2c 09 4f 50 54 5f 42 47 45 52 52 IASES,.OPT_BGERR
1540: 4f 52 2c 09 4f 50 54 5f 44 45 42 55 47 2c 0a 2b OR,.OPT_DEBUG,.+
1550: 09 4f 50 54 5f 45 56 41 4c 2c 09 4f 50 54 5f 45 .OPT_EVAL,.OPT_E
1560: 58 50 4f 53 45 2c 09 4f 50 54 5f 48 49 44 45 2c XPOSE,.OPT_HIDE,
1570: 09 4f 50 54 5f 48 49 44 44 45 4e 2c 0a 2b 09 4f .OPT_HIDDEN,.+.O
1580: 50 54 5f 49 53 53 41 46 45 2c 09 4f 50 54 5f 49 PT_ISSAFE,.OPT_I
1590: 4e 56 4f 4b 45 48 49 44 44 45 4e 2c 20 4f 50 54 NVOKEHIDDEN, OPT
15a0: 5f 4c 49 4d 49 54 2c 09 4f 50 54 5f 4d 41 52 4b _LIMIT,.OPT_MARK
15b0: 54 52 55 53 54 45 44 2c 0a 2b 09 4f 50 54 5f 52 TRUSTED,.+.OPT_R
15c0: 45 43 4c 49 4d 49 54 0a 20 20 20 20 20 7d 3b 0a ECLIMIT. };.
15d0: 20 0a 20 20 20 20 20 69 66 20 28 73 6c 61 76 65 . if (slave
15e0: 49 6e 74 65 72 70 20 3d 3d 20 4e 55 4c 4c 29 20 Interp == NULL)
15f0: 7b 0a 40 40 20 2d 32 34 32 38 2c 36 20 2b 32 34 {.@@ -2428,6 +24
1600: 35 32 2c 31 36 20 40 40 0a 20 09 20 20 20 20 72 52,16 @@. . r
1610: 65 74 75 72 6e 20 54 43 4c 5f 45 52 52 4f 52 3b eturn TCL_ERROR;
1620: 0a 20 09 7d 0a 20 09 72 65 74 75 72 6e 20 53 6c . .}. .return Sl
1630: 61 76 65 42 67 65 72 72 6f 72 28 69 6e 74 65 72 aveBgerror(inter
1640: 70 2c 20 73 6c 61 76 65 49 6e 74 65 72 70 2c 20 p, slaveInterp,
1650: 6f 62 6a 63 20 2d 20 32 2c 20 6f 62 6a 76 20 2b objc - 2, objv +
1660: 20 32 29 3b 0a 2b 20 20 20 20 63 61 73 65 20 4f 2);.+ case O
1670: 50 54 5f 44 45 42 55 47 3a 0a 2b 09 2f 2a 0a 2b PT_DEBUG:.+./*.+
1680: 09 20 2a 20 54 49 50 20 23 33 37 38 0a 2b 09 20 . * TIP #378.+.
1690: 2a 20 43 75 72 72 65 6e 74 6c 79 20 6f 6e 6c 79 * Currently only
16a0: 20 2d 66 72 61 6d 65 20 73 75 70 70 6f 72 74 65 -frame supporte
16b0: 64 2c 20 6f 74 68 65 72 77 69 73 65 20 3f 2d 6f d, otherwise ?-o
16c0: 70 74 69 6f 6e 20 3f 76 61 6c 75 65 3f 20 2e 2e ption ?value? ..
16d0: 2e 3f 0a 2b 09 20 2a 2f 0a 2b 09 69 66 20 28 6f .?.+. */.+.if (o
16e0: 62 6a 63 20 3e 20 34 29 20 7b 0a 2b 09 20 20 20 bjc > 4) {.+.
16f0: 20 54 63 6c 5f 57 72 6f 6e 67 4e 75 6d 41 72 67 Tcl_WrongNumArg
1700: 73 28 69 6e 74 65 72 70 2c 20 32 2c 20 6f 62 6a s(interp, 2, obj
1710: 76 2c 20 22 3f 2d 66 72 61 6d 65 20 3f 62 6f 6f v, "?-frame ?boo
1720: 6c 3f 3f 22 29 3b 0a 2b 09 20 20 20 20 72 65 74 l??");.+. ret
1730: 75 72 6e 20 54 43 4c 5f 45 52 52 4f 52 3b 0a 2b urn TCL_ERROR;.+
1740: 09 7d 0a 2b 09 72 65 74 75 72 6e 20 53 6c 61 76 .}.+.return Slav
1750: 65 44 65 62 75 67 43 6d 64 28 69 6e 74 65 72 70 eDebugCmd(interp
1760: 2c 20 73 6c 61 76 65 49 6e 74 65 72 70 2c 20 6f , slaveInterp, o
1770: 62 6a 63 20 2d 20 32 2c 20 6f 62 6a 76 20 2b 20 bjc - 2, objv +
1780: 32 29 3b 0a 20 20 20 20 20 63 61 73 65 20 4f 50 2);. case OP
1790: 54 5f 45 56 41 4c 3a 0a 20 09 69 66 20 28 6f 62 T_EVAL:. .if (ob
17a0: 6a 63 20 3c 20 33 29 20 7b 0a 20 09 20 20 20 20 jc < 3) {. .
17b0: 54 63 6c 5f 57 72 6f 6e 67 4e 75 6d 41 72 67 73 Tcl_WrongNumArgs
17c0: 28 69 6e 74 65 72 70 2c 20 32 2c 20 6f 62 6a 76 (interp, 2, objv
17d0: 2c 20 22 61 72 67 20 3f 61 72 67 20 2e 2e 2e 3f , "arg ?arg ...?
17e0: 22 29 3b 0a 40 40 20 2d 32 35 39 31 2c 36 20 2b ");.@@ -2591,6 +
17f0: 32 36 32 35 2c 37 35 20 40 40 0a 20 2f 2a 0a 20 2625,75 @@. /*.
1800: 20 2a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d *--------------
1810: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1820: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1830: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1840: 2d 2d 2d 2d 2d 2d 2d 2d 0a 20 20 2a 0a 2b 20 2a --------. *.+ *
1850: 20 53 6c 61 76 65 44 65 62 75 67 43 6d 64 20 2d SlaveDebugCmd -
1860: 2d 20 54 49 50 20 23 33 37 38 0a 2b 20 2a 0a 2b - TIP #378.+ *.+
1870: 20 2a 09 48 65 6c 70 65 72 20 66 75 6e 63 74 69 *.Helper functi
1880: 6f 6e 20 74 6f 20 68 61 6e 64 6c 65 20 27 64 65 on to handle 'de
1890: 62 75 67 27 20 63 6f 6d 6d 61 6e 64 20 69 6e 20 bug' command in
18a0: 61 20 73 6c 61 76 65 20 69 6e 74 65 72 70 72 65 a slave interpre
18b0: 74 65 72 2e 0a 2b 20 2a 0a 2b 20 2a 20 52 65 73 ter..+ *.+ * Res
18c0: 75 6c 74 73 3a 0a 2b 20 2a 09 41 20 73 74 61 6e ults:.+ *.A stan
18d0: 64 61 72 64 20 54 63 6c 20 72 65 73 75 6c 74 2e dard Tcl result.
18e0: 0a 2b 20 2a 0a 2b 20 2a 20 53 69 64 65 20 65 66 .+ *.+ * Side ef
18f0: 66 65 63 74 73 3a 0a 2b 20 2a 09 4d 61 79 20 6d fects:.+ *.May m
1900: 6f 64 69 66 79 20 49 4e 54 45 52 50 5f 44 45 42 odify INTERP_DEB
1910: 55 47 5f 46 52 41 4d 45 20 66 6c 61 67 20 69 6e UG_FRAME flag in
1920: 20 74 68 65 20 73 6c 61 76 65 2e 0a 2b 20 2a 0a the slave..+ *.
1930: 2b 20 2a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d + *-------------
1940: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1950: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1960: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1970: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 2b 20 2a 2f 0a 2b ---------.+ */.+
1980: 0a 2b 73 74 61 74 69 63 20 69 6e 74 0a 2b 53 6c .+static int.+Sl
1990: 61 76 65 44 65 62 75 67 43 6d 64 28 0a 2b 20 20 aveDebugCmd(.+
19a0: 20 20 54 63 6c 5f 49 6e 74 65 72 70 20 2a 69 6e Tcl_Interp *in
19b0: 74 65 72 70 2c 09 09 2f 2a 20 49 6e 74 65 72 70 terp,../* Interp
19c0: 20 66 6f 72 20 65 72 72 6f 72 20 72 65 74 75 72 for error retur
19d0: 6e 2e 20 2a 2f 0a 2b 20 20 20 20 54 63 6c 5f 49 n. */.+ Tcl_I
19e0: 6e 74 65 72 70 20 2a 73 6c 61 76 65 49 6e 74 65 nterp *slaveInte
19f0: 72 70 2c 09 2f 2a 20 54 68 65 20 73 6c 61 76 65 rp,./* The slave
1a00: 20 69 6e 74 65 72 70 72 65 74 65 72 20 69 6e 20 interpreter in
1a10: 77 68 69 63 68 20 63 6f 6d 6d 61 6e 64 0a 2b 09 which command.+.
1a20: 09 09 09 20 2a 20 77 69 6c 6c 20 62 65 20 65 76 ... * will be ev
1a30: 61 6c 75 61 74 65 64 2e 20 2a 2f 0a 2b 20 20 20 aluated. */.+
1a40: 20 69 6e 74 20 6f 62 6a 63 2c 09 09 09 2f 2a 20 int objc,.../*
1a50: 4e 75 6d 62 65 72 20 6f 66 20 61 72 67 75 6d 65 Number of argume
1a60: 6e 74 73 2e 20 2a 2f 0a 2b 20 20 20 20 54 63 6c nts. */.+ Tcl
1a70: 5f 4f 62 6a 20 2a 63 6f 6e 73 74 20 6f 62 6a 76 _Obj *const objv
1a80: 5b 5d 29 09 2f 2a 20 41 72 67 75 6d 65 6e 74 20 [])./* Argument
1a90: 6f 62 6a 65 63 74 73 2e 20 2a 2f 0a 2b 7b 0a 2b objects. */.+{.+
1aa0: 20 20 20 20 73 74 61 74 69 63 20 63 6f 6e 73 74 static const
1ab0: 20 63 68 61 72 20 2a 63 6f 6e 73 74 20 64 65 62 char *const deb
1ac0: 75 67 54 79 70 65 73 5b 5d 20 3d 20 7b 0a 2b 09 ugTypes[] = {.+.
1ad0: 22 2d 66 72 61 6d 65 22 2c 20 4e 55 4c 4c 0a 2b "-frame", NULL.+
1ae0: 20 20 20 20 7d 3b 0a 2b 20 20 20 20 65 6e 75 6d };.+ enum
1af0: 20 44 65 62 75 67 54 79 70 65 73 20 7b 0a 2b 09 DebugTypes {.+.
1b00: 44 45 42 55 47 5f 54 59 50 45 5f 46 52 41 4d 45 DEBUG_TYPE_FRAME
1b10: 0a 2b 20 20 20 20 7d 3b 0a 2b 20 20 20 20 69 6e .+ };.+ in
1b20: 74 20 64 65 62 75 67 54 79 70 65 3b 0a 2b 20 20 t debugType;.+
1b30: 20 20 49 6e 74 65 72 70 20 2a 69 50 74 72 3b 0a Interp *iPtr;.
1b40: 2b 20 20 20 20 54 63 6c 5f 4f 62 6a 20 2a 72 65 + Tcl_Obj *re
1b50: 73 75 6c 74 50 74 72 3b 0a 2b 0a 2b 20 20 20 20 sultPtr;.+.+
1b60: 69 50 74 72 20 3d 20 28 49 6e 74 65 72 70 20 2a iPtr = (Interp *
1b70: 29 20 73 6c 61 76 65 49 6e 74 65 72 70 3b 0a 2b ) slaveInterp;.+
1b80: 20 20 20 20 69 66 20 28 6f 62 6a 63 20 3d 3d 20 if (objc ==
1b90: 30 29 20 7b 0a 2b 09 72 65 73 75 6c 74 50 74 72 0) {.+.resultPtr
1ba0: 20 3d 20 54 63 6c 5f 4e 65 77 4f 62 6a 28 29 3b = Tcl_NewObj();
1bb0: 0a 2b 09 54 63 6c 5f 4c 69 73 74 4f 62 6a 41 70 .+.Tcl_ListObjAp
1bc0: 70 65 6e 64 45 6c 65 6d 65 6e 74 28 4e 55 4c 4c pendElement(NULL
1bd0: 2c 20 72 65 73 75 6c 74 50 74 72 2c 0a 2b 09 09 , resultPtr,.+..
1be0: 54 63 6c 5f 4e 65 77 53 74 72 69 6e 67 4f 62 6a Tcl_NewStringObj
1bf0: 28 22 2d 66 72 61 6d 65 22 2c 20 2d 31 29 29 3b ("-frame", -1));
1c00: 0a 2b 09 54 63 6c 5f 4c 69 73 74 4f 62 6a 41 70 .+.Tcl_ListObjAp
1c10: 70 65 6e 64 45 6c 65 6d 65 6e 74 28 4e 55 4c 4c pendElement(NULL
1c20: 2c 20 72 65 73 75 6c 74 50 74 72 2c 0a 2b 09 09 , resultPtr,.+..
1c30: 54 63 6c 5f 4e 65 77 42 6f 6f 6c 65 61 6e 4f 62 Tcl_NewBooleanOb
1c40: 6a 28 69 50 74 72 2d 3e 66 6c 61 67 73 20 26 20 j(iPtr->flags &
1c50: 49 4e 54 45 52 50 5f 44 45 42 55 47 5f 46 52 41 INTERP_DEBUG_FRA
1c60: 4d 45 29 29 3b 0a 2b 09 54 63 6c 5f 53 65 74 4f ME));.+.Tcl_SetO
1c70: 62 6a 52 65 73 75 6c 74 28 69 6e 74 65 72 70 2c bjResult(interp,
1c80: 20 72 65 73 75 6c 74 50 74 72 29 3b 0a 2b 20 20 resultPtr);.+
1c90: 20 20 7d 20 65 6c 73 65 20 7b 0a 2b 09 69 66 20 } else {.+.if
1ca0: 28 54 63 6c 5f 47 65 74 49 6e 64 65 78 46 72 6f (Tcl_GetIndexFro
1cb0: 6d 4f 62 6a 28 69 6e 74 65 72 70 2c 20 6f 62 6a mObj(interp, obj
1cc0: 76 5b 30 5d 2c 20 64 65 62 75 67 54 79 70 65 73 v[0], debugTypes
1cd0: 2c 0a 2b 09 09 09 22 64 65 62 75 67 20 6f 70 74 ,.+..."debug opt
1ce0: 69 6f 6e 22 2c 20 30 2c 20 26 64 65 62 75 67 54 ion", 0, &debugT
1cf0: 79 70 65 29 20 21 3d 20 54 43 4c 5f 4f 4b 29 20 ype) != TCL_OK)
1d00: 7b 0a 2b 09 20 20 20 20 72 65 74 75 72 6e 20 54 {.+. return T
1d10: 43 4c 5f 45 52 52 4f 52 3b 0a 2b 09 7d 0a 2b 09 CL_ERROR;.+.}.+.
1d20: 69 66 20 28 64 65 62 75 67 54 79 70 65 20 3d 3d if (debugType ==
1d30: 20 44 45 42 55 47 5f 54 59 50 45 5f 46 52 41 4d DEBUG_TYPE_FRAM
1d40: 45 29 20 7b 0a 2b 09 20 20 20 20 69 66 20 28 6f E) {.+. if (o
1d50: 62 6a 63 20 3d 3d 20 32 29 20 7b 20 2f 2a 20 73 bjc == 2) { /* s
1d60: 65 74 20 2a 2f 0a 2b 09 09 69 66 20 28 54 63 6c et */.+..if (Tcl
1d70: 5f 47 65 74 42 6f 6f 6c 65 61 6e 46 72 6f 6d 4f _GetBooleanFromO
1d80: 62 6a 28 69 6e 74 65 72 70 2c 20 6f 62 6a 76 5b bj(interp, objv[
1d90: 31 5d 2c 20 26 64 65 62 75 67 54 79 70 65 29 0a 1], &debugType).
1da0: 2b 09 09 09 21 3d 20 54 43 4c 5f 4f 4b 29 20 7b +...!= TCL_OK) {
1db0: 0a 2b 09 09 20 20 20 20 72 65 74 75 72 6e 20 54 .+.. return T
1dc0: 43 4c 5f 45 52 52 4f 52 3b 0a 2b 09 09 7d 0a 2b CL_ERROR;.+..}.+
1dd0: 09 09 2f 2a 0a 2b 09 09 20 2a 20 51 75 69 65 74 ../*.+.. * Quiet
1de0: 6c 79 20 69 67 6e 6f 72 65 20 61 74 74 65 6d 70 ly ignore attemp
1df0: 74 73 20 74 6f 20 64 69 73 61 62 6c 65 20 69 6e ts to disable in
1e00: 74 65 72 70 20 64 65 62 75 67 67 69 6e 67 2e 0a terp debugging..
1e10: 2b 09 09 20 2a 20 54 68 69 73 20 69 73 20 61 20 +.. * This is a
1e20: 6f 6e 65 2d 77 61 79 20 73 77 69 74 63 68 20 61 one-way switch a
1e30: 73 20 66 72 61 6d 65 20 64 65 62 75 67 20 69 6e s frame debug in
1e40: 66 6f 20 69 73 20 6d 61 69 6e 74 61 69 6e 65 64 fo is maintained
1e50: 0a 2b 09 09 20 2a 20 69 6e 20 61 20 73 74 61 63 .+.. * in a stac
1e60: 6b 20 74 68 61 74 20 6d 75 73 74 20 62 65 20 63 k that must be c
1e70: 6f 6e 73 69 73 74 65 6e 74 20 6f 6e 63 65 20 74 onsistent once t
1e80: 75 72 6e 65 64 20 6f 6e 2e 0a 2b 09 09 20 2a 2f urned on..+.. */
1e90: 0a 2b 09 09 69 66 20 28 64 65 62 75 67 54 79 70 .+..if (debugTyp
1ea0: 65 29 20 7b 0a 2b 09 09 20 20 20 20 69 50 74 72 e) {.+.. iPtr
1eb0: 2d 3e 66 6c 61 67 73 20 7c 3d 20 49 4e 54 45 52 ->flags |= INTER
1ec0: 50 5f 44 45 42 55 47 5f 46 52 41 4d 45 3b 0a 2b P_DEBUG_FRAME;.+
1ed0: 09 09 7d 0a 2b 09 20 20 20 20 7d 0a 2b 09 20 20 ..}.+. }.+.
1ee0: 20 20 54 63 6c 5f 53 65 74 4f 62 6a 52 65 73 75 Tcl_SetObjResu
1ef0: 6c 74 28 69 6e 74 65 72 70 2c 0a 2b 09 09 20 20 lt(interp,.+..
1f00: 20 20 54 63 6c 5f 4e 65 77 42 6f 6f 6c 65 61 6e Tcl_NewBoolean
1f10: 4f 62 6a 28 69 50 74 72 2d 3e 66 6c 61 67 73 20 Obj(iPtr->flags
1f20: 26 20 49 4e 54 45 52 50 5f 44 45 42 55 47 5f 46 & INTERP_DEBUG_F
1f30: 52 41 4d 45 29 29 3b 0a 2b 09 7d 0a 2b 20 20 20 RAME));.+.}.+
1f40: 20 7d 0a 2b 20 20 20 20 72 65 74 75 72 6e 20 54 }.+ return T
1f50: 43 4c 5f 4f 4b 3b 0a 2b 7d 0a 2b 0c 0a 2b 2f 2a CL_OK;.+}.+..+/*
1f60: 0a 2b 20 2a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d .+ *------------
1f70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1f80: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1f90: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1fa0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 2b 20 2a 0a 20 ----------.+ *.
1fb0: 20 2a 20 53 6c 61 76 65 45 76 61 6c 20 2d 2d 0a * SlaveEval --.
1fc0: 20 20 2a 0a 20 20 2a 09 48 65 6c 70 65 72 20 66 *. *.Helper f
1fd0: 75 6e 63 74 69 6f 6e 20 74 6f 20 65 76 61 6c 75 unction to evalu
1fe0: 61 74 65 20 61 20 63 6f 6d 6d 61 6e 64 20 69 6e ate a command in
1ff0: 20 61 20 73 6c 61 76 65 20 69 6e 74 65 72 70 72 a slave interpr
2000: 65 74 65 72 2e 0a 2d 2d 2d 20 74 63 6c 38 36 2e eter..--- tcl86.
2010: 6f 72 69 67 2f 67 65 6e 65 72 69 63 2f 74 63 6c orig/generic/tcl
2020: 49 6e 74 2e 68 09 32 30 31 30 2d 31 30 2d 30 34 Int.h.2010-10-04
2030: 20 31 35 3a 34 39 3a 32 32 2e 30 30 30 30 30 30 15:49:22.000000
2040: 30 30 30 20 2d 30 37 30 30 0a 2b 2b 2b 20 74 63 000 -0700.+++ tc
2050: 6c 38 36 2f 67 65 6e 65 72 69 63 2f 74 63 6c 49 l86/generic/tclI
2060: 6e 74 2e 68 09 32 30 31 30 2d 31 30 2d 30 34 20 nt.h.2010-10-04
2070: 31 35 3a 35 30 3a 31 39 2e 30 30 30 30 30 30 30 15:50:19.0000000
2080: 30 30 20 2d 30 37 30 30 0a 40 40 20 2d 32 32 35 00 -0700.@@ -225
2090: 31 2c 36 20 2b 32 32 35 31 2c 39 20 40 40 0a 20 1,6 +2251,9 @@.
20a0: 20 2a 20 53 41 46 45 5f 49 4e 54 45 52 50 3a 09 * SAFE_INTERP:.
20b0: 09 4e 6f 6e 20 7a 65 72 6f 20 6d 65 61 6e 73 20 .Non zero means
20c0: 74 68 61 74 20 74 68 65 20 63 75 72 72 65 6e 74 that the current
20d0: 20 69 6e 74 65 72 70 20 69 73 20 61 20 73 61 66 interp is a saf
20e0: 65 0a 20 20 2a 09 09 09 69 6e 74 65 72 70 20 28 e. *...interp (
20f0: 69 2e 65 2e 20 69 74 20 68 61 73 20 6f 6e 6c 79 i.e. it has only
2100: 20 74 68 65 20 73 61 66 65 20 63 6f 6d 6d 61 6e the safe comman
2110: 64 73 20 69 6e 73 74 61 6c 6c 65 64 2c 0a 20 20 ds installed,.
2120: 2a 09 09 09 6c 65 73 73 20 70 72 69 76 69 6c 65 *...less privile
2130: 64 67 65 20 74 68 61 6e 20 61 20 72 65 67 75 6c dge than a regul
2140: 61 72 20 69 6e 74 65 72 70 29 2e 0a 2b 20 2a 20 ar interp)..+ *
2150: 49 4e 54 45 52 50 5f 44 45 42 55 47 5f 46 52 41 INTERP_DEBUG_FRA
2160: 4d 45 3a 09 55 73 65 64 20 66 6f 72 20 73 77 69 ME:.Used for swi
2170: 74 63 68 69 6e 67 20 6f 6e 20 76 61 72 69 6f 75 tching on variou
2180: 73 20 65 78 74 72 61 20 69 6e 74 65 72 70 72 65 s extra interpre
2190: 74 65 72 0a 2b 20 2a 09 09 09 64 65 62 75 67 2f ter.+ *...debug/
21a0: 69 6e 66 6f 20 6d 65 63 68 61 6e 69 73 6d 73 20 info mechanisms
21b0: 28 65 2e 67 2e 20 69 6e 66 6f 20 66 72 61 6d 65 (e.g. info frame
21c0: 20 65 76 61 6c 2f 75 70 6c 65 76 65 6c 0a 2b 20 eval/uplevel.+
21d0: 2a 09 09 09 74 72 61 63 69 6e 67 29 20 77 68 69 *...tracing) whi
21e0: 63 68 20 61 72 65 20 70 65 72 66 6f 72 6d 61 6e ch are performan
21f0: 63 65 20 69 6e 74 65 6e 73 69 76 65 2e 0a 20 20 ce intensive..
2200: 2a 20 49 4e 54 45 52 50 5f 54 52 41 43 45 5f 49 * INTERP_TRACE_I
2210: 4e 5f 50 52 4f 47 52 45 53 53 3a 20 4e 6f 6e 2d N_PROGRESS: Non-
2220: 7a 65 72 6f 20 6d 65 61 6e 73 20 74 68 61 74 20 zero means that
2230: 61 6e 20 69 6e 74 65 72 70 20 74 72 61 63 65 20 an interp trace
2240: 69 73 20 63 75 72 72 65 6e 74 6c 79 0a 20 20 2a is currently. *
2250: 09 09 09 61 63 74 69 76 65 3b 20 73 6f 20 6e 6f ...active; so no
2260: 20 66 75 72 74 68 65 72 20 74 72 61 63 65 20 63 further trace c
2270: 61 6c 6c 62 61 63 6b 73 20 73 68 6f 75 6c 64 20 allbacks should
2280: 62 65 0a 20 20 2a 09 09 09 69 6e 76 6f 6b 65 64 be. *...invoked
2290: 2e 0a 40 40 20 2d 32 32 37 36 2c 36 20 2b 32 32 ..@@ -2276,6 +22
22a0: 37 39 2c 37 20 40 40 0a 20 0a 20 23 64 65 66 69 79,7 @@. . #defi
22b0: 6e 65 20 44 45 4c 45 54 45 44 09 09 09 09 20 20 ne DELETED....
22c0: 20 20 20 31 0a 20 23 64 65 66 69 6e 65 20 45 52 1. #define ER
22d0: 52 5f 41 4c 52 45 41 44 59 5f 4c 4f 47 47 45 44 R_ALREADY_LOGGED
22e0: 09 09 20 20 20 20 20 34 0a 2b 23 64 65 66 69 6e .. 4.+#defin
22f0: 65 20 49 4e 54 45 52 50 5f 44 45 42 55 47 5f 46 e INTERP_DEBUG_F
2300: 52 41 4d 45 09 09 20 20 30 78 31 30 0a 20 23 64 RAME.. 0x10. #d
2310: 65 66 69 6e 65 20 44 4f 4e 54 5f 43 4f 4d 50 49 efine DONT_COMPI
2320: 4c 45 5f 43 4d 44 53 5f 49 4e 4c 49 4e 45 09 20 LE_CMDS_INLINE.
2330: 20 30 78 32 30 0a 20 23 64 65 66 69 6e 65 20 52 0x20. #define R
2340: 41 4e 44 5f 53 45 45 44 5f 49 4e 49 54 49 41 4c AND_SEED_INITIAL
2350: 49 5a 45 44 09 09 20 20 30 78 34 30 0a 20 23 64 IZED.. 0x40. #d
2360: 65 66 69 6e 65 20 53 41 46 45 5f 49 4e 54 45 52 efine SAFE_INTER
2370: 50 09 09 09 20 20 30 78 38 30 0a 2d 2d 2d 20 74 P... 0x80.--- t
2380: 63 6c 38 36 2e 6f 72 69 67 2f 74 65 73 74 73 2f cl86.orig/tests/
2390: 69 6e 66 6f 2e 74 65 73 74 09 32 30 31 30 2d 31 info.test.2010-1
23a0: 30 2d 30 34 20 31 35 3a 34 39 3a 32 32 2e 30 30 0-04 15:49:22.00
23b0: 30 30 30 30 30 30 30 20 2d 30 37 30 30 0a 2b 2b 0000000 -0700.++
23c0: 2b 20 74 63 6c 38 36 2f 74 65 73 74 73 2f 69 6e + tcl86/tests/in
23d0: 66 6f 2e 74 65 73 74 09 32 30 31 30 2d 31 30 2d fo.test.2010-10-
23e0: 30 35 20 30 39 3a 35 37 3a 34 33 2e 30 30 30 30 05 09:57:43.0000
23f0: 30 30 30 30 30 20 2d 30 37 30 30 0a 40 40 20 2d 00000 -0700.@@ -
2400: 36 39 30 2c 31 34 20 2b 36 39 30 2c 31 32 20 40 690,14 +690,12 @
2410: 40 0a 20 23 23 0a 20 23 20 23 23 23 20 23 23 23 @. ##. # ### ###
2420: 20 23 23 23 20 23 23 23 23 23 23 23 23 23 20 23 ### ######### #
2430: 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 ######## #######
2440: 23 23 0a 20 23 23 20 69 6e 66 6f 20 66 72 61 6d ##. ## info fram
2450: 65 0a 2d 0a 20 23 23 20 48 65 6c 70 65 72 0a 20 e.-. ## Helper.
2460: 23 20 46 6f 72 20 74 68 65 20 6d 6f 72 65 20 63 # For the more c
2470: 6f 6d 70 6c 65 78 20 72 65 73 75 6c 74 73 20 77 omplex results w
2480: 65 20 63 75 74 20 74 68 65 20 66 69 6c 65 20 6e e cut the file n
2490: 61 6d 65 20 64 6f 77 6e 20 74 6f 20 72 65 6d 6f ame down to remo
24a0: 76 65 20 70 61 74 68 0a 20 23 20 64 65 70 65 6e ve path. # depen
24b0: 64 65 6e 63 69 65 73 2c 20 61 6e 64 20 77 65 20 dencies, and we
24c0: 75 73 65 20 6f 6e 6c 79 20 70 61 72 74 20 6f 66 use only part of
24d0: 20 74 68 65 20 66 69 72 73 74 20 6c 69 6e 65 20 the first line
24e0: 6f 66 20 74 68 65 20 72 65 70 6f 72 74 65 64 0a of the reported.
24f0: 20 23 20 63 6f 6d 6d 61 6e 64 2e 20 54 68 65 20 # command. The
2500: 6c 61 74 74 65 72 20 69 73 20 72 65 71 75 69 72 latter is requir
2510: 65 64 20 62 65 63 61 75 73 65 20 6f 74 68 65 72 ed because other
2520: 77 69 73 65 20 74 68 65 20 77 68 6f 6c 65 20 74 wise the whole t
2530: 65 73 74 20 63 61 73 65 20 6d 61 79 0a 20 23 20 est case may. #
2540: 61 70 70 65 61 72 20 69 6e 20 73 6f 6d 65 20 72 appear in some r
2550: 65 73 75 6c 74 73 2c 20 62 75 74 20 74 68 65 20 esults, but the
2560: 72 65 73 75 6c 74 20 69 73 20 70 61 72 74 20 6f result is part o
2570: 66 20 74 68 65 20 74 65 73 74 63 61 73 65 2e 20 f the testcase.
2580: 41 6e 20 69 6e 66 69 6e 69 74 65 0a 20 23 20 73 An infinite. # s
2590: 74 72 69 6e 67 20 77 6f 75 6c 64 20 62 65 20 72 tring would be r
25a0: 65 71 75 69 72 65 64 20 74 6f 20 64 65 73 63 72 equired to descr
25b0: 69 62 65 20 74 68 61 74 2e 20 54 68 65 20 63 75 ibe that. The cu
25c0: 74 74 69 6e 67 2d 64 6f 77 6e 20 62 72 65 61 6b tting-down break
25d0: 73 20 74 68 69 73 2e 0a 2d 0a 20 70 72 6f 63 20 s this..-. proc
25e0: 72 65 64 75 63 65 20 7b 66 72 61 6d 65 7d 20 7b reduce {frame} {
25f0: 0a 20 20 20 20 20 73 65 74 20 20 70 6f 73 20 5b . set pos [
2600: 6c 73 65 61 72 63 68 20 2d 65 78 61 63 74 20 24 lsearch -exact $
2610: 66 72 61 6d 65 20 63 6d 64 5d 0a 20 20 20 20 20 frame cmd].
2620: 69 6e 63 72 20 70 6f 73 0a 40 40 20 2d 37 31 34 incr pos.@@ -714
2630: 2c 37 20 2b 37 31 32 2c 39 20 40 40 0a 20 20 20 ,7 +712,9 @@.
2640: 20 20 7d 0a 20 20 20 20 20 73 65 74 20 66 72 61 }. set fra
2650: 6d 65 0a 20 7d 0a 2d 0a 2b 70 72 6f 63 20 73 75 me. }.-.+proc su
2660: 62 69 6e 74 65 72 70 20 7b 7d 20 7b 20 69 6e 74 binterp {} { int
2670: 65 72 70 20 63 72 65 61 74 65 20 73 75 62 20 3b erp create sub ;
2680: 20 69 6e 74 65 72 70 20 64 65 62 75 67 20 73 75 interp debug su
2690: 62 20 2d 66 72 61 6d 65 20 31 3b 0a 2b 20 20 20 b -frame 1;.+
26a0: 20 69 6e 74 65 72 70 20 65 76 61 6c 20 73 75 62 interp eval sub
26b0: 20 5b 6c 69 73 74 20 70 72 6f 63 20 72 65 64 75 [list proc redu
26c0: 63 65 20 5b 69 6e 66 6f 20 61 72 67 73 20 72 65 ce [info args re
26d0: 64 75 63 65 5d 20 5b 69 6e 66 6f 20 62 6f 64 79 duce] [info body
26e0: 20 72 65 64 75 63 65 5d 5d 0a 2b 7d 0a 20 23 23 reduce]].+}. ##
26f0: 20 48 65 6c 70 65 72 0a 20 23 20 47 65 6e 65 72 Helper. # Gener
2700: 61 74 65 20 61 20 73 74 61 63 6b 74 72 61 63 65 ate a stacktrace
2710: 20 66 72 6f 6d 20 74 68 65 20 63 75 72 72 65 6e from the curren
2720: 74 20 6c 6f 63 61 74 69 6f 6e 20 74 6f 20 74 6f t location to to
2730: 70 2e 20 20 54 68 69 73 20 63 6f 64 65 0a 20 23 p. This code. #
2740: 20 6e 6f 74 20 6f 6e 6c 79 20 64 65 70 65 6e 64 not only depend
2750: 73 20 6f 6e 20 74 68 65 20 65 78 61 63 74 20 6c s on the exact l
2760: 6f 63 61 74 69 6f 6e 20 6f 66 20 74 68 69 6e 67 ocation of thing
2770: 73 2c 20 62 75 74 20 61 6c 73 6f 20 6f 6e 20 74 s, but also on t
2780: 68 65 0a 40 40 20 2d 31 33 36 33 2c 31 34 20 2b he.@@ -1363,14 +
2790: 31 33 36 33 2c 31 34 20 40 40 0a 20 2a 20 7b 74 1363,14 @@. * {t
27a0: 79 70 65 20 65 76 61 6c 20 6c 69 6e 65 20 33 20 ype eval line 3
27b0: 63 6d 64 20 65 74 72 61 63 65 20 70 72 6f 63 20 cmd etrace proc
27c0: 3a 3a 74 63 6c 74 65 73 74 3a 3a 52 75 6e 54 65 ::tcltest::RunTe
27d0: 73 74 7d 0a 20 2a 20 7b 74 79 70 65 20 73 6f 75 st}. * {type sou
27e0: 72 63 65 20 6c 69 6e 65 20 31 33 36 31 20 66 69 rce line 1361 fi
27f0: 6c 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 le info.test cmd
2800: 20 7b 75 70 6c 65 76 65 6c 20 5c 5c 23 30 20 24 {uplevel \\#0 $
2810: 73 63 72 69 70 74 7d 20 70 72 6f 63 20 3a 3a 74 script} proc ::t
2820: 63 6c 74 65 73 74 3a 3a 52 75 6e 54 65 73 74 7d cltest::RunTest}
2830: 7d 20 2d 63 6c 65 61 6e 75 70 20 7b 75 6e 73 65 } -cleanup {unse
2840: 74 20 73 63 72 69 70 74 20 79 7d 0a 20 0a 2d 74 t script y}. .-t
2850: 65 73 74 20 69 6e 66 6f 2d 33 38 2e 32 20 7b 6c est info-38.2 {l
2860: 6f 63 61 74 69 6f 6e 20 69 6e 66 6f 72 6d 61 74 ocation informat
2870: 69 6f 6e 20 66 6f 72 20 75 70 6c 65 76 65 6c 2c ion for uplevel,
2880: 20 64 6c 2c 20 64 69 72 65 63 74 2d 6c 69 74 65 dl, direct-lite
2890: 72 61 6c 7d 20 2d 6d 61 74 63 68 20 67 6c 6f 62 ral} -match glob
28a0: 20 2d 62 6f 64 79 20 7b 0a 2d 20 20 20 20 6a 6f -body {.- jo
28b0: 69 6e 20 5b 6c 72 61 6e 67 65 20 5b 75 70 6c 65 in [lrange [uple
28c0: 76 65 6c 20 5c 23 30 20 7b 0a 2d 09 73 65 74 20 vel \#0 {.-.set
28d0: 79 20 44 4c 2e 0a 2d 09 65 74 72 61 63 65 0a 2d y DL..-.etrace.-
28e0: 20 20 20 20 7d 5d 20 30 20 32 5d 20 5c 6e 0a 2d }] 0 2] \n.-
28f0: 7d 20 2d 72 65 73 75 6c 74 20 7b 2a 20 7b 74 79 } -result {* {ty
2900: 70 65 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 37 pe source line 7
2910: 32 38 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 28 file info.tes
2920: 74 20 63 6d 64 20 7b 69 6e 66 6f 20 66 72 61 6d t cmd {info fram
2930: 65 20 24 6c 65 76 65 6c 7d 20 70 72 6f 63 20 3a e $level} proc :
2940: 3a 65 74 72 61 63 65 20 6c 65 76 65 6c 20 30 7d :etrace level 0}
2950: 0a 2d 2a 20 7b 74 79 70 65 20 73 6f 75 72 63 65 .-* {type source
2960: 20 6c 69 6e 65 20 31 33 36 39 20 66 69 6c 65 20 line 1369 file
2970: 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 65 74 info.test cmd et
2980: 72 61 63 65 20 70 72 6f 63 20 3a 3a 74 63 6c 74 race proc ::tclt
2990: 65 73 74 3a 3a 52 75 6e 54 65 73 74 7d 0a 2d 2a est::RunTest}.-*
29a0: 20 7b 74 79 70 65 20 73 6f 75 72 63 65 20 6c 69 {type source li
29b0: 6e 65 20 31 33 36 37 20 66 69 6c 65 20 69 6e 66 ne 1367 file inf
29c0: 6f 2e 74 65 73 74 20 63 6d 64 20 75 70 6c 65 76 o.test cmd uplev
29d0: 65 6c 5c 5c 20 5c 5c 5c 5c 20 70 72 6f 63 20 3a el\\ \\\\ proc :
29e0: 3a 74 63 6c 74 65 73 74 3a 3a 52 75 6e 54 65 73 :tcltest::RunTes
29f0: 74 7d 7d 20 2d 63 6c 65 61 6e 75 70 20 7b 75 6e t}} -cleanup {un
2a00: 73 65 74 20 79 7d 0a 2b 23 20 33 38 2e 32 20 6d set y}.+# 38.2 m
2a10: 6f 76 65 64 20 74 6f 20 62 6f 74 74 6f 6d 20 74 oved to bottom t
2a20: 6f 20 6e 6f 74 20 64 69 73 74 75 72 62 20 6f 74 o not disturb ot
2a30: 68 65 72 20 74 65 73 74 73 20 77 69 74 68 20 74 her tests with t
2a40: 68 65 20 6e 65 63 65 73 73 61 72 79 20 63 68 61 he necessary cha
2a50: 6e 67 65 73 20 74 6f 20 74 68 69 73 20 6f 6e 65 nges to this one
2a60: 2e 0a 2b 0a 2b 0a 2b 0a 2b 0a 2b 0a 2b 0a 2b 0a ..+.+.+.+.+.+.+.
2a70: 20 0a 20 74 65 73 74 20 69 6e 66 6f 2d 33 38 2e . test info-38.
2a80: 33 20 7b 6c 6f 63 61 74 69 6f 6e 20 69 6e 66 6f 3 {location info
2a90: 72 6d 61 74 69 6f 6e 20 66 6f 72 20 75 70 6c 65 rmation for uple
2aa0: 76 65 6c 2c 20 64 70 76 2c 20 64 69 72 65 63 74 vel, dpv, direct
2ab0: 2d 70 72 6f 63 2d 76 61 72 7d 20 2d 6d 61 74 63 -proc-var} -matc
2ac0: 68 20 67 6c 6f 62 20 2d 62 6f 64 79 20 7b 0a 20 h glob -body {.
2ad0: 20 20 20 20 73 65 74 20 73 63 72 69 70 74 20 7b set script {
2ae0: 0a 40 40 20 2d 31 33 38 33 2c 31 35 20 2b 31 33 .@@ -1383,15 +13
2af0: 38 33 2c 31 35 20 40 40 0a 20 2a 20 7b 74 79 70 83,15 @@. * {typ
2b00: 65 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 31 33 e source line 13
2b10: 33 38 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 38 file info.tes
2b20: 74 20 63 6d 64 20 7b 75 70 6c 65 76 65 6c 20 31 t cmd {uplevel 1
2b30: 20 24 73 63 72 69 70 74 7d 20 70 72 6f 63 20 3a $script} proc :
2b40: 3a 63 6f 6e 74 72 6f 6c 7d 0a 20 2a 20 7b 74 79 :control}. * {ty
2b50: 70 65 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 31 pe source line 1
2b60: 33 38 30 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 380 file info.te
2b70: 73 74 20 63 6d 64 20 7b 63 6f 6e 74 72 6f 6c 20 st cmd {control
2b80: 79 20 24 73 63 72 69 70 74 7d 20 70 72 6f 63 20 y $script} proc
2b90: 3a 3a 74 63 6c 74 65 73 74 3a 3a 52 75 6e 54 65 ::tcltest::RunTe
2ba0: 73 74 7d 7d 20 2d 63 6c 65 61 6e 75 70 20 7b 75 st}} -cleanup {u
2bb0: 6e 73 65 74 20 73 63 72 69 70 74 20 79 7d 0a 20 nset script y}.
2bc0: 0a 2d 74 65 73 74 20 69 6e 66 6f 2d 33 38 2e 34 .-test info-38.4
2bd0: 20 7b 6c 6f 63 61 74 69 6f 6e 20 69 6e 66 6f 72 {location infor
2be0: 6d 61 74 69 6f 6e 20 66 6f 72 20 75 70 6c 65 76 mation for uplev
2bf0: 65 6c 2c 20 64 70 76 2c 20 64 69 72 65 63 74 2d el, dpv, direct-
2c00: 70 72 6f 63 2d 6c 69 74 65 72 61 6c 7d 20 2d 6d proc-literal} -m
2c10: 61 74 63 68 20 67 6c 6f 62 20 2d 62 6f 64 79 20 atch glob -body
2c20: 7b 0a 2d 20 20 20 20 6a 6f 69 6e 20 5b 6c 72 61 {.- join [lra
2c30: 6e 67 65 20 5b 63 6f 6e 74 72 6f 6c 20 79 20 7b nge [control y {
2c40: 0a 2d 09 73 65 74 20 79 20 44 50 4c 0a 2d 09 65 .-.set y DPL.-.e
2c50: 74 72 61 63 65 0a 2d 20 20 20 20 7d 5d 20 30 20 trace.- }] 0
2c60: 33 5d 20 5c 6e 0a 2d 7d 20 2d 72 65 73 75 6c 74 3] \n.-} -result
2c70: 20 7b 2a 20 7b 74 79 70 65 20 73 6f 75 72 63 65 {* {type source
2c80: 20 6c 69 6e 65 20 37 32 38 20 66 69 6c 65 20 69 line 728 file i
2c90: 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 7b 69 6e nfo.test cmd {in
2ca0: 66 6f 20 66 72 61 6d 65 20 24 6c 65 76 65 6c 7d fo frame $level}
2cb0: 20 70 72 6f 63 20 3a 3a 65 74 72 61 63 65 20 6c proc ::etrace l
2cc0: 65 76 65 6c 20 30 7d 0a 2d 2a 20 7b 74 79 70 65 evel 0}.-* {type
2cd0: 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 31 33 38 source line 138
2ce0: 39 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 9 file info.test
2cf0: 20 63 6d 64 20 65 74 72 61 63 65 20 70 72 6f 63 cmd etrace proc
2d00: 20 3a 3a 63 6f 6e 74 72 6f 6c 7d 0a 2d 2a 20 7b ::control}.-* {
2d10: 74 79 70 65 20 73 6f 75 72 63 65 20 6c 69 6e 65 type source line
2d20: 20 31 33 33 38 20 66 69 6c 65 20 69 6e 66 6f 2e 1338 file info.
2d30: 74 65 73 74 20 63 6d 64 20 7b 75 70 6c 65 76 65 test cmd {upleve
2d40: 6c 20 31 20 24 73 63 72 69 70 74 7d 20 70 72 6f l 1 $script} pro
2d50: 63 20 3a 3a 63 6f 6e 74 72 6f 6c 7d 0a 2d 2a 20 c ::control}.-*
2d60: 7b 74 79 70 65 20 73 6f 75 72 63 65 20 6c 69 6e {type source lin
2d70: 65 20 31 33 38 37 20 66 69 6c 65 20 69 6e 66 6f e 1387 file info
2d80: 2e 74 65 73 74 20 63 6d 64 20 63 6f 6e 74 72 6f .test cmd contro
2d90: 6c 20 70 72 6f 63 20 3a 3a 74 63 6c 74 65 73 74 l proc ::tcltest
2da0: 3a 3a 52 75 6e 54 65 73 74 7d 7d 20 2d 63 6c 65 ::RunTest}} -cle
2db0: 61 6e 75 70 20 7b 75 6e 73 65 74 20 79 7d 0a 2b anup {unset y}.+
2dc0: 23 20 33 38 2e 34 20 6d 6f 76 65 64 20 74 6f 20 # 38.4 moved to
2dd0: 62 6f 74 74 6f 6d 20 74 6f 20 6e 6f 74 20 64 69 bottom to not di
2de0: 73 74 75 72 62 20 6f 74 68 65 72 20 74 65 73 74 sturb other test
2df0: 73 20 77 69 74 68 20 74 68 65 20 6e 65 63 65 73 s with the neces
2e00: 73 61 72 79 20 63 68 61 6e 67 65 73 20 74 6f 20 sary changes to
2e10: 74 68 69 73 20 6f 6e 65 2e 0a 2b 0a 2b 0a 2b 0a this one..+.+.+.
2e20: 2b 0a 2b 0a 2b 0a 2b 0a 2b 0a 20 0a 20 74 65 73 +.+.+.+.+. . tes
2e30: 74 20 69 6e 66 6f 2d 33 38 2e 35 20 7b 6c 6f 63 t info-38.5 {loc
2e40: 61 74 69 6f 6e 20 69 6e 66 6f 72 6d 61 74 69 6f ation informatio
2e50: 6e 20 66 6f 72 20 75 70 6c 65 76 65 6c 2c 20 70 n for uplevel, p
2e60: 70 76 2c 20 70 72 6f 63 2d 70 72 6f 63 2d 76 61 pv, proc-proc-va
2e70: 72 7d 20 2d 6d 61 74 63 68 20 67 6c 6f 62 20 2d r} -match glob -
2e80: 62 6f 64 79 20 7b 0a 20 20 20 20 20 6a 6f 69 6e body {. join
2e90: 20 5b 6c 72 61 6e 67 65 20 5b 64 61 74 61 76 5d [lrange [datav]
2ea0: 20 30 20 34 5d 20 5c 6e 0a 40 40 20 2d 31 34 30 0 4] \n.@@ -140
2eb0: 31 2c 31 33 20 2b 31 34 30 31 2c 31 33 20 40 40 1,13 +1401,13 @@
2ec0: 0a 20 2a 20 7b 74 79 70 65 20 73 6f 75 72 63 65 . * {type source
2ed0: 20 6c 69 6e 65 20 31 33 35 33 20 66 69 6c 65 20 line 1353 file
2ee0: 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 7b 63 info.test cmd {c
2ef0: 6f 6e 74 72 6f 6c 20 79 20 24 73 63 72 69 70 74 ontrol y $script
2f00: 7d 20 70 72 6f 63 20 3a 3a 64 61 74 61 76 20 6c } proc ::datav l
2f10: 65 76 65 6c 20 31 7d 0a 20 2a 20 7b 74 79 70 65 evel 1}. * {type
2f20: 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 31 33 39 source line 139
2f30: 37 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 7 file info.test
2f40: 20 63 6d 64 20 64 61 74 61 76 20 70 72 6f 63 20 cmd datav proc
2f50: 3a 3a 74 63 6c 74 65 73 74 3a 3a 52 75 6e 54 65 ::tcltest::RunTe
2f60: 73 74 7d 7d 0a 20 0a 2d 74 65 73 74 20 69 6e 66 st}}. .-test inf
2f70: 6f 2d 33 38 2e 36 20 7b 6c 6f 63 61 74 69 6f 6e o-38.6 {location
2f80: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 66 6f 72 information for
2f90: 20 75 70 6c 65 76 65 6c 2c 20 70 70 6c 2c 20 70 uplevel, ppl, p
2fa0: 72 6f 63 2d 70 72 6f 63 2d 6c 69 74 65 72 61 6c roc-proc-literal
2fb0: 7d 20 2d 6d 61 74 63 68 20 67 6c 6f 62 20 2d 62 } -match glob -b
2fc0: 6f 64 79 20 7b 0a 2d 20 20 20 20 6a 6f 69 6e 20 ody {.- join
2fd0: 5b 6c 72 61 6e 67 65 20 5b 64 61 74 61 6c 5d 20 [lrange [datal]
2fe0: 30 20 34 5d 20 5c 6e 0a 2d 7d 20 2d 72 65 73 75 0 4] \n.-} -resu
2ff0: 6c 74 20 7b 2a 20 7b 74 79 70 65 20 73 6f 75 72 lt {* {type sour
3000: 63 65 20 6c 69 6e 65 20 37 32 38 20 66 69 6c 65 ce line 728 file
3010: 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 7b info.test cmd {
3020: 69 6e 66 6f 20 66 72 61 6d 65 20 24 6c 65 76 65 info frame $leve
3030: 6c 7d 20 70 72 6f 63 20 3a 3a 65 74 72 61 63 65 l} proc ::etrace
3040: 20 6c 65 76 65 6c 20 30 7d 0a 2d 2a 20 7b 74 79 level 0}.-* {ty
3050: 70 65 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 31 pe source line 1
3060: 33 34 34 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 344 file info.te
3070: 73 74 20 63 6d 64 20 65 74 72 61 63 65 20 70 72 st cmd etrace pr
3080: 6f 63 20 3a 3a 63 6f 6e 74 72 6f 6c 7d 0a 2d 2a oc ::control}.-*
3090: 20 7b 74 79 70 65 20 73 6f 75 72 63 65 20 6c 69 {type source li
30a0: 6e 65 20 31 33 33 38 20 66 69 6c 65 20 69 6e 66 ne 1338 file inf
30b0: 6f 2e 74 65 73 74 20 63 6d 64 20 7b 75 70 6c 65 o.test cmd {uple
30c0: 76 65 6c 20 31 20 24 73 63 72 69 70 74 7d 20 70 vel 1 $script} p
30d0: 72 6f 63 20 3a 3a 63 6f 6e 74 72 6f 6c 7d 0a 2d roc ::control}.-
30e0: 2a 20 7b 74 79 70 65 20 73 6f 75 72 63 65 20 6c * {type source l
30f0: 69 6e 65 20 31 33 34 32 20 66 69 6c 65 20 69 6e ine 1342 file in
3100: 66 6f 2e 74 65 73 74 20 63 6d 64 20 63 6f 6e 74 fo.test cmd cont
3110: 72 6f 6c 20 70 72 6f 63 20 3a 3a 64 61 74 61 6c rol proc ::datal
3120: 20 6c 65 76 65 6c 20 31 7d 0a 2d 2a 20 7b 74 79 level 1}.-* {ty
3130: 70 65 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 31 pe source line 1
3140: 34 30 35 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 405 file info.te
3150: 73 74 20 63 6d 64 20 64 61 74 61 6c 20 70 72 6f st cmd datal pro
3160: 63 20 3a 3a 74 63 6c 74 65 73 74 3a 3a 52 75 6e c ::tcltest::Run
3170: 54 65 73 74 7d 7d 0a 2b 23 20 33 38 2e 36 20 6d Test}}.+# 38.6 m
3180: 6f 76 65 64 20 74 6f 20 62 6f 74 74 6f 6d 20 74 oved to bottom t
3190: 6f 20 6e 6f 74 20 64 69 73 74 75 72 62 20 6f 74 o not disturb ot
31a0: 68 65 72 20 74 65 73 74 73 20 77 69 74 68 20 74 her tests with t
31b0: 68 65 20 6e 65 63 65 73 73 61 72 79 20 63 68 61 he necessary cha
31c0: 6e 67 65 73 20 74 6f 20 74 68 69 73 20 6f 6e 65 nges to this one
31d0: 2e 0a 2b 0a 2b 0a 2b 0a 2b 0a 2b 0a 2b 0a 20 0a ..+.+.+.+.+.+. .
31e0: 20 74 65 73 74 43 6f 6e 73 74 72 61 69 6e 74 20 testConstraint
31f0: 74 65 73 74 65 76 61 6c 65 78 20 5b 6c 6c 65 6e testevalex [llen
3200: 67 74 68 20 5b 69 6e 66 6f 20 63 6f 6d 6d 61 6e gth [info comman
3210: 64 73 20 74 65 73 74 65 76 61 6c 65 78 5d 5d 0a ds testevalex]].
3220: 20 74 65 73 74 20 69 6e 66 6f 2d 33 38 2e 37 20 test info-38.7
3230: 7b 6c 6f 63 61 74 69 6f 6e 20 69 6e 66 6f 72 6d {location inform
3240: 61 74 69 6f 6e 20 66 6f 72 20 61 72 67 20 73 75 ation for arg su
3250: 62 73 74 69 74 75 74 69 6f 6e 7d 20 2d 63 6f 6e bstitution} -con
3260: 73 74 72 61 69 6e 74 73 20 74 65 73 74 65 76 61 straints testeva
3270: 6c 65 78 20 2d 6d 61 74 63 68 20 67 6c 6f 62 20 lex -match glob
3280: 2d 62 6f 64 79 20 7b 0a 40 40 20 2d 31 35 34 33 -body {.@@ -1543
3290: 2c 31 38 20 2b 31 35 34 33 2c 31 38 20 40 40 0a ,18 +1543,18 @@.
32a0: 20 7d 20 2d 63 6c 65 61 6e 75 70 20 7b 75 6e 73 } -cleanup {uns
32b0: 65 74 20 72 65 73 20 78 7d 20 2d 72 65 73 75 6c et res x} -resul
32c0: 74 20 7b 20 20 20 74 79 70 65 20 73 6f 75 72 63 t { type sourc
32d0: 65 20 6c 69 6e 65 20 31 35 34 31 20 66 69 6c 65 e line 1541 file
32e0: 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 7b info.test cmd {
32f0: 69 6e 66 6f 20 66 72 61 6d 65 20 30 7d 20 70 72 info frame 0} pr
3300: 6f 63 20 3a 3a 74 63 6c 74 65 73 74 3a 3a 52 75 oc ::tcltest::Ru
3310: 6e 54 65 73 74 7d 0a 20 0a 20 74 65 73 74 20 69 nTest}. . test i
3320: 6e 66 6f 2d 33 30 2e 31 33 20 7b 62 73 2b 6e 6c nfo-30.13 {bs+nl
3330: 20 69 6e 20 6c 69 74 65 72 61 6c 20 77 6f 72 64 in literal word
3340: 73 2c 20 75 70 6c 65 76 65 6c 20 73 63 72 69 70 s, uplevel scrip
3350: 74 2c 20 77 69 74 68 20 6e 65 73 74 65 64 20 77 t, with nested w
3360: 6f 72 64 73 7d 20 2d 62 6f 64 79 20 7b 0a 2d 20 ords} -body {.-
3370: 20 20 20 75 70 6c 65 76 65 6c 20 23 30 20 7b 0a uplevel #0 {.
3380: 2b 20 20 20 20 73 75 62 69 6e 74 65 72 70 20 3b + subinterp ;
3390: 20 73 65 74 20 72 65 73 20 5b 69 6e 74 65 72 70 set res [interp
33a0: 20 65 76 61 6c 20 73 75 62 20 7b 20 75 70 6c 65 eval sub { uple
33b0: 76 65 6c 20 23 30 20 7b 0a 20 09 69 66 20 7b 31 vel #0 {. .if {1
33c0: 7d 20 5c 0a 20 09 20 20 20 20 7b 0a 20 09 09 73 } \. . {. ..s
33d0: 65 74 20 3a 3a 72 65 73 20 5c 0a 20 09 09 20 20 et ::res \. ..
33e0: 20 20 5b 72 65 64 75 63 65 20 5b 69 6e 66 6f 20 [reduce [info
33f0: 66 72 61 6d 65 20 30 5d 5d 3b 23 20 6c 69 6e 65 frame 0]];# line
3400: 20 31 35 35 30 0a 20 09 20 20 20 20 7d 0a 20 20 1550. . }.
3410: 20 20 20 7d 0a 2d 20 20 20 20 72 65 74 75 72 6e }.- return
3420: 20 24 72 65 73 0a 2d 7d 20 2d 63 6c 65 61 6e 75 $res.-} -cleanu
3430: 70 20 7b 75 6e 73 65 74 20 72 65 73 7d 20 2d 72 p {unset res} -r
3440: 65 73 75 6c 74 20 7b 74 79 70 65 20 73 6f 75 72 esult {type sour
3450: 63 65 20 6c 69 6e 65 20 31 35 35 30 20 66 69 6c ce line 1550 fil
3460: 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 e info.test cmd
3470: 7b 69 6e 66 6f 20 66 72 61 6d 65 20 30 7d 20 70 {info frame 0} p
3480: 72 6f 63 20 3a 3a 74 63 6c 74 65 73 74 3a 3a 52 roc ::tcltest::R
3490: 75 6e 54 65 73 74 7d 0a 2b 20 20 20 20 73 65 74 unTest}.+ set
34a0: 20 72 65 73 20 7d 5d 20 3b 20 69 6e 74 65 72 70 res }] ; interp
34b0: 20 64 65 6c 65 74 65 20 73 75 62 20 3b 20 73 65 delete sub ; se
34c0: 74 20 72 65 73 0a 2b 7d 20 2d 63 6c 65 61 6e 75 t res.+} -cleanu
34d0: 70 20 7b 75 6e 73 65 74 20 72 65 73 7d 20 2d 72 p {unset res} -r
34e0: 65 73 75 6c 74 20 7b 74 79 70 65 20 73 6f 75 72 esult {type sour
34f0: 63 65 20 6c 69 6e 65 20 31 35 35 30 20 66 69 6c ce line 1550 fil
3500: 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 e info.test cmd
3510: 7b 69 6e 66 6f 20 66 72 61 6d 65 20 30 7d 20 6c {info frame 0} l
3520: 65 76 65 6c 20 30 7d 0a 20 0a 20 74 65 73 74 20 evel 0}. . test
3530: 69 6e 66 6f 2d 33 30 2e 31 34 20 7b 62 73 2b 6e info-30.14 {bs+n
3540: 6c 2c 20 6c 69 74 65 72 61 6c 20 77 6f 72 64 2c l, literal word,
3550: 20 75 70 6c 65 76 65 6c 20 74 68 72 6f 75 67 68 uplevel through
3560: 20 70 72 6f 63 7d 20 7b 0a 2d 20 20 20 20 70 72 proc} {.- pr
3570: 6f 63 20 61 62 72 61 20 7b 73 63 72 69 70 74 7d oc abra {script}
3580: 20 7b 0a 2b 20 20 20 20 73 75 62 69 6e 74 65 72 {.+ subinter
3590: 70 20 3b 20 73 65 74 20 72 65 73 20 5b 69 6e 74 p ; set res [int
35a0: 65 72 70 20 65 76 61 6c 20 73 75 62 20 7b 20 70 erp eval sub { p
35b0: 72 6f 63 20 61 62 72 61 20 7b 73 63 72 69 70 74 roc abra {script
35c0: 7d 20 7b 0a 20 09 75 70 6c 65 76 65 6c 20 31 20 } {. .uplevel 1
35d0: 24 73 63 72 69 70 74 0a 20 20 20 20 20 7d 0a 20 $script. }.
35e0: 20 20 20 20 73 65 74 20 72 65 73 20 5b 61 62 72 set res [abr
35f0: 61 20 7b 0a 40 40 20 2d 31 35 36 32 2c 37 20 2b a {.@@ -1562,7 +
3600: 31 35 36 32 2c 37 20 40 40 0a 20 5b 72 65 64 75 1562,7 @@. [redu
3610: 63 65 20 5b 69 6e 66 6f 20 66 72 61 6d 65 20 30 ce [info frame 0
3620: 5d 5d 22 3b 23 20 6c 69 6e 65 20 31 35 36 32 0a ]]";# line 1562.
3630: 20 20 20 20 20 7d 5d 0a 20 20 20 20 20 72 65 6e }]. ren
3640: 61 6d 65 20 61 62 72 61 20 7b 7d 0a 2d 20 20 20 ame abra {}.-
3650: 20 73 65 74 20 72 65 73 0a 2b 20 20 20 20 73 65 set res.+ se
3660: 74 20 72 65 73 20 7d 5d 20 3b 20 69 6e 74 65 72 t res }] ; inter
3670: 70 20 64 65 6c 65 74 65 20 73 75 62 20 3b 20 73 p delete sub ; s
3680: 65 74 20 72 65 73 0a 20 7d 20 7b 20 74 79 70 65 et res. } { type
3690: 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 31 35 36 source line 156
36a0: 32 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 2 file info.test
36b0: 20 63 6d 64 20 7b 69 6e 66 6f 20 66 72 61 6d 65 cmd {info frame
36c0: 20 30 7d 20 70 72 6f 63 20 3a 3a 61 62 72 61 7d 0} proc ::abra}
36d0: 0a 20 0a 20 74 65 73 74 20 69 6e 66 6f 2d 33 30 . . test info-30
36e0: 2e 31 35 20 7b 62 73 2b 6e 6c 20 69 6e 20 6c 69 .15 {bs+nl in li
36f0: 74 65 72 61 6c 20 77 6f 72 64 73 2c 20 6e 65 73 teral words, nes
3700: 74 65 64 20 70 72 6f 63 20 62 6f 64 79 2c 20 63 ted proc body, c
3710: 6f 6d 70 69 6c 65 64 7d 20 7b 0a 40 40 20 2d 31 ompiled} {.@@ -1
3720: 38 37 39 2c 36 20 2b 31 38 37 39 2c 38 33 20 40 879,6 +1879,83 @
3730: 40 0a 20 74 79 70 65 20 73 6f 75 72 63 65 20 6c @. type source l
3740: 69 6e 65 20 31 38 35 39 20 66 69 6c 65 20 69 6e ine 1859 file in
3750: 66 6f 2e 74 65 73 74 20 63 6d 64 20 70 72 69 6e fo.test cmd prin
3760: 74 5f 6f 6e 65 20 70 72 6f 63 20 3a 3a 74 65 73 t_one proc ::tes
3770: 74 5f 69 6e 66 6f 5f 66 72 61 6d 65 20 6c 65 76 t_info_frame lev
3780: 65 6c 20 31 7d 0a 20 0a 20 23 20 2d 2d 2d 2d 2d el 1}. . # -----
3790: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
37a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
37b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
37c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
37d0: 2d 2d 2d 2d 0a 2b 23 20 54 65 73 74 73 20 6d 6f ----.+# Tests mo
37e0: 76 65 64 20 74 6f 20 74 68 65 20 65 6e 64 20 74 ved to the end t
37f0: 6f 20 6e 6f 74 20 64 69 73 74 75 72 62 20 6f 74 o not disturb ot
3800: 68 65 72 20 74 65 73 74 73 20 61 6e 64 20 74 68 her tests and th
3810: 65 69 72 20 6c 6f 63 61 74 69 6f 6e 73 2e 0a 2b eir locations..+
3820: 0a 2b 74 65 73 74 20 69 6e 66 6f 2d 33 38 2e 36 .+test info-38.6
3830: 20 7b 6c 6f 63 61 74 69 6f 6e 20 69 6e 66 6f 72 {location infor
3840: 6d 61 74 69 6f 6e 20 66 6f 72 20 75 70 6c 65 76 mation for uplev
3850: 65 6c 2c 20 70 70 6c 2c 20 70 72 6f 63 2d 70 72 el, ppl, proc-pr
3860: 6f 63 2d 6c 69 74 65 72 61 6c 7d 20 2d 6d 61 74 oc-literal} -mat
3870: 63 68 20 67 6c 6f 62 20 2d 73 65 74 75 70 20 7b ch glob -setup {
3880: 73 75 62 69 6e 74 65 72 70 7d 20 2d 62 6f 64 79 subinterp} -body
3890: 20 7b 0a 2b 20 20 20 20 69 6e 74 65 72 70 20 65 {.+ interp e
38a0: 76 61 6c 20 73 75 62 20 7b 0a 2b 09 70 72 6f 63 val sub {.+.proc
38b0: 20 65 74 72 61 63 65 20 7b 7d 20 7b 0a 2b 09 20 etrace {} {.+.
38c0: 20 20 20 73 65 74 20 72 65 73 20 7b 7d 0a 2b 09 set res {}.+.
38d0: 20 20 20 20 73 65 74 20 6c 65 76 65 6c 20 5b 69 set level [i
38e0: 6e 66 6f 20 66 72 61 6d 65 5d 0a 2b 09 20 20 20 nfo frame].+.
38f0: 20 77 68 69 6c 65 20 7b 24 6c 65 76 65 6c 7d 20 while {$level}
3900: 7b 0a 2b 09 09 6c 61 70 70 65 6e 64 20 72 65 73 {.+..lappend res
3910: 20 5b 6c 69 73 74 20 24 6c 65 76 65 6c 20 5b 72 [list $level [r
3920: 65 64 75 63 65 20 5b 69 6e 66 6f 20 66 72 61 6d educe [info fram
3930: 65 20 24 6c 65 76 65 6c 5d 5d 5d 0a 2b 09 09 69 e $level]]].+..i
3940: 6e 63 72 20 6c 65 76 65 6c 20 2d 31 0a 2b 09 20 ncr level -1.+.
3950: 20 20 20 7d 0a 2b 09 20 20 20 20 72 65 74 75 72 }.+. retur
3960: 6e 20 24 72 65 73 0a 2b 09 7d 0a 2b 09 70 72 6f n $res.+.}.+.pro
3970: 63 20 63 6f 6e 74 72 6f 6c 20 7b 76 76 20 73 63 c control {vv sc
3980: 72 69 70 74 7d 20 7b 0a 2b 09 20 20 20 20 75 70 ript} {.+. up
3990: 76 61 72 20 31 20 24 76 76 20 76 61 72 0a 2b 09 var 1 $vv var.+.
39a0: 20 20 20 20 72 65 74 75 72 6e 20 5b 75 70 6c 65 return [uple
39b0: 76 65 6c 20 31 20 24 73 63 72 69 70 74 5d 0a 2b vel 1 $script].+
39c0: 09 7d 0a 2b 09 70 72 6f 63 20 64 61 74 61 6c 20 .}.+.proc datal
39d0: 7b 7d 20 7b 0a 2b 09 20 20 20 20 63 6f 6e 74 72 {} {.+. contr
39e0: 6f 6c 20 79 20 7b 0a 2b 09 09 73 65 74 20 79 20 ol y {.+..set y
39f0: 50 50 4c 0a 2b 09 09 65 74 72 61 63 65 0a 2b 09 PPL.+..etrace.+.
3a00: 20 20 20 20 7d 0a 2b 09 7d 0a 2b 09 6a 6f 69 6e }.+.}.+.join
3a10: 20 5b 6c 72 61 6e 67 65 20 5b 64 61 74 61 6c 5d [lrange [datal]
3a20: 20 30 20 34 5d 20 5c 6e 0a 2b 20 20 20 20 7d 0a 0 4] \n.+ }.
3a30: 2b 7d 20 2d 72 65 73 75 6c 74 20 7b 2a 20 7b 74 +} -result {* {t
3a40: 79 70 65 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 ype source line
3a50: 31 38 39 30 20 66 69 6c 65 20 69 6e 66 6f 2e 74 1890 file info.t
3a60: 65 73 74 20 63 6d 64 20 7b 69 6e 66 6f 20 66 72 est cmd {info fr
3a70: 61 6d 65 20 24 6c 65 76 65 6c 7d 20 70 72 6f 63 ame $level} proc
3a80: 20 3a 3a 65 74 72 61 63 65 20 6c 65 76 65 6c 20 ::etrace level
3a90: 30 7d 0a 2b 2a 20 7b 74 79 70 65 20 73 6f 75 72 0}.+* {type sour
3aa0: 63 65 20 6c 69 6e 65 20 31 39 30 32 20 66 69 6c ce line 1902 fil
3ab0: 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 e info.test cmd
3ac0: 65 74 72 61 63 65 20 70 72 6f 63 20 3a 3a 63 6f etrace proc ::co
3ad0: 6e 74 72 6f 6c 7d 0a 2b 2a 20 7b 74 79 70 65 20 ntrol}.+* {type
3ae0: 73 6f 75 72 63 65 20 6c 69 6e 65 20 31 38 39 37 source line 1897
3af0: 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 20 file info.test
3b00: 63 6d 64 20 7b 75 70 6c 65 76 65 6c 20 31 20 24 cmd {uplevel 1 $
3b10: 73 63 72 69 70 74 7d 20 70 72 6f 63 20 3a 3a 63 script} proc ::c
3b20: 6f 6e 74 72 6f 6c 7d 0a 2b 2a 20 7b 74 79 70 65 ontrol}.+* {type
3b30: 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 31 39 30 source line 190
3b40: 30 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 0 file info.test
3b50: 20 63 6d 64 20 63 6f 6e 74 72 6f 6c 20 70 72 6f cmd control pro
3b60: 63 20 3a 3a 64 61 74 61 6c 20 6c 65 76 65 6c 20 c ::datal level
3b70: 31 7d 0a 2b 2a 20 7b 74 79 70 65 20 73 6f 75 72 1}.+* {type sour
3b80: 63 65 20 6c 69 6e 65 20 31 39 30 35 20 66 69 6c ce line 1905 fil
3b90: 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 e info.test cmd
3ba0: 64 61 74 61 6c 20 6c 65 76 65 6c 20 32 7d 7d 20 datal level 2}}
3bb0: 2d 63 6c 65 61 6e 75 70 20 7b 69 6e 74 65 72 70 -cleanup {interp
3bc0: 20 64 65 6c 65 74 65 20 73 75 62 7d 0a 2b 0a 2b delete sub}.+.+
3bd0: 74 65 73 74 20 69 6e 66 6f 2d 33 38 2e 34 20 7b test info-38.4 {
3be0: 6c 6f 63 61 74 69 6f 6e 20 69 6e 66 6f 72 6d 61 location informa
3bf0: 74 69 6f 6e 20 66 6f 72 20 75 70 6c 65 76 65 6c tion for uplevel
3c00: 2c 20 64 70 76 2c 20 64 69 72 65 63 74 2d 70 72 , dpv, direct-pr
3c10: 6f 63 2d 6c 69 74 65 72 61 6c 7d 20 2d 6d 61 74 oc-literal} -mat
3c20: 63 68 20 67 6c 6f 62 20 2d 73 65 74 75 70 20 7b ch glob -setup {
3c30: 73 75 62 69 6e 74 65 72 70 7d 20 2d 62 6f 64 79 subinterp} -body
3c40: 20 7b 0a 2b 20 20 20 20 69 6e 74 65 72 70 20 65 {.+ interp e
3c50: 76 61 6c 20 73 75 62 20 7b 0a 2b 09 70 72 6f 63 val sub {.+.proc
3c60: 20 65 74 72 61 63 65 20 7b 7d 20 7b 0a 2b 09 20 etrace {} {.+.
3c70: 20 20 20 73 65 74 20 72 65 73 20 7b 7d 0a 2b 09 set res {}.+.
3c80: 20 20 20 20 73 65 74 20 6c 65 76 65 6c 20 5b 69 set level [i
3c90: 6e 66 6f 20 66 72 61 6d 65 5d 0a 2b 09 20 20 20 nfo frame].+.
3ca0: 20 77 68 69 6c 65 20 7b 24 6c 65 76 65 6c 7d 20 while {$level}
3cb0: 7b 0a 2b 09 09 6c 61 70 70 65 6e 64 20 72 65 73 {.+..lappend res
3cc0: 20 5b 6c 69 73 74 20 24 6c 65 76 65 6c 20 5b 72 [list $level [r
3cd0: 65 64 75 63 65 20 5b 69 6e 66 6f 20 66 72 61 6d educe [info fram
3ce0: 65 20 24 6c 65 76 65 6c 5d 5d 5d 0a 2b 09 09 69 e $level]]].+..i
3cf0: 6e 63 72 20 6c 65 76 65 6c 20 2d 31 0a 2b 09 20 ncr level -1.+.
3d00: 20 20 20 7d 0a 2b 09 20 20 20 20 72 65 74 75 72 }.+. retur
3d10: 6e 20 24 72 65 73 0a 2b 09 7d 0a 2b 09 70 72 6f n $res.+.}.+.pro
3d20: 63 20 63 6f 6e 74 72 6f 6c 20 7b 76 76 20 73 63 c control {vv sc
3d30: 72 69 70 74 7d 20 7b 0a 2b 09 20 20 20 20 75 70 ript} {.+. up
3d40: 76 61 72 20 31 20 24 76 76 20 76 61 72 0a 2b 09 var 1 $vv var.+.
3d50: 20 20 20 20 72 65 74 75 72 6e 20 5b 75 70 6c 65 return [uple
3d60: 76 65 6c 20 31 20 24 73 63 72 69 70 74 5d 0a 2b vel 1 $script].+
3d70: 09 7d 0a 2b 09 6a 6f 69 6e 20 5b 6c 72 61 6e 67 .}.+.join [lrang
3d80: 65 20 5b 63 6f 6e 74 72 6f 6c 20 79 20 7b 0a 2b e [control y {.+
3d90: 09 20 20 20 20 73 65 74 20 79 20 44 50 4c 0a 2b . set y DPL.+
3da0: 09 20 20 20 20 65 74 72 61 63 65 0a 2b 09 7d 5d . etrace.+.}]
3db0: 20 30 20 33 5d 20 5c 6e 0a 2b 20 20 20 20 7d 0a 0 3] \n.+ }.
3dc0: 2b 7d 20 2d 72 65 73 75 6c 74 20 7b 2a 20 7b 74 +} -result {* {t
3dd0: 79 70 65 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 ype source line
3de0: 31 39 31 39 20 66 69 6c 65 20 69 6e 66 6f 2e 74 1919 file info.t
3df0: 65 73 74 20 63 6d 64 20 7b 69 6e 66 6f 20 66 72 est cmd {info fr
3e00: 61 6d 65 20 24 6c 65 76 65 6c 7d 20 70 72 6f 63 ame $level} proc
3e10: 20 3a 3a 65 74 72 61 63 65 20 6c 65 76 65 6c 20 ::etrace level
3e20: 30 7d 0a 2b 2a 20 7b 74 79 70 65 20 73 6f 75 72 0}.+* {type sour
3e30: 63 65 20 6c 69 6e 65 20 31 39 33 30 20 66 69 6c ce line 1930 fil
3e40: 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 6d 64 20 e info.test cmd
3e50: 65 74 72 61 63 65 20 70 72 6f 63 20 3a 3a 63 6f etrace proc ::co
3e60: 6e 74 72 6f 6c 7d 0a 2b 2a 20 7b 74 79 70 65 20 ntrol}.+* {type
3e70: 73 6f 75 72 63 65 20 6c 69 6e 65 20 31 39 32 36 source line 1926
3e80: 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 20 file info.test
3e90: 63 6d 64 20 7b 75 70 6c 65 76 65 6c 20 31 20 24 cmd {uplevel 1 $
3ea0: 73 63 72 69 70 74 7d 20 70 72 6f 63 20 3a 3a 63 script} proc ::c
3eb0: 6f 6e 74 72 6f 6c 7d 0a 2b 2a 20 7b 74 79 70 65 ontrol}.+* {type
3ec0: 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 31 39 32 source line 192
3ed0: 38 20 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 8 file info.test
3ee0: 20 63 6d 64 20 63 6f 6e 74 72 6f 6c 20 6c 65 76 cmd control lev
3ef0: 65 6c 20 31 7d 7d 20 2d 63 6c 65 61 6e 75 70 20 el 1}} -cleanup
3f00: 7b 69 6e 74 65 72 70 20 64 65 6c 65 74 65 20 73 {interp delete s
3f10: 75 62 7d 0a 2b 0a 2b 74 65 73 74 20 69 6e 66 6f ub}.+.+test info
3f20: 2d 33 38 2e 32 20 7b 6c 6f 63 61 74 69 6f 6e 20 -38.2 {location
3f30: 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 66 6f 72 20 information for
3f40: 75 70 6c 65 76 65 6c 2c 20 64 6c 2c 20 64 69 72 uplevel, dl, dir
3f50: 65 63 74 2d 6c 69 74 65 72 61 6c 7d 20 2d 6d 61 ect-literal} -ma
3f60: 74 63 68 20 67 6c 6f 62 20 2d 73 65 74 75 70 20 tch glob -setup
3f70: 7b 73 75 62 69 6e 74 65 72 70 7d 20 2d 62 6f 64 {subinterp} -bod
3f80: 79 20 7b 0a 2b 20 20 20 20 69 6e 74 65 72 70 20 y {.+ interp
3f90: 65 76 61 6c 20 73 75 62 20 7b 0a 2b 09 70 72 6f eval sub {.+.pro
3fa0: 63 20 65 74 72 61 63 65 20 7b 7d 20 7b 0a 2b 09 c etrace {} {.+.
3fb0: 20 20 20 20 73 65 74 20 72 65 73 20 7b 7d 0a 2b set res {}.+
3fc0: 09 20 20 20 20 73 65 74 20 6c 65 76 65 6c 20 5b . set level [
3fd0: 69 6e 66 6f 20 66 72 61 6d 65 5d 0a 2b 09 20 20 info frame].+.
3fe0: 20 20 77 68 69 6c 65 20 7b 24 6c 65 76 65 6c 7d while {$level}
3ff0: 20 7b 0a 2b 09 09 6c 61 70 70 65 6e 64 20 72 65 {.+..lappend re
4000: 73 20 5b 6c 69 73 74 20 24 6c 65 76 65 6c 20 5b s [list $level [
4010: 72 65 64 75 63 65 20 5b 69 6e 66 6f 20 66 72 61 reduce [info fra
4020: 6d 65 20 24 6c 65 76 65 6c 5d 5d 5d 0a 2b 09 09 me $level]]].+..
4030: 69 6e 63 72 20 6c 65 76 65 6c 20 2d 31 0a 2b 09 incr level -1.+.
4040: 20 20 20 20 7d 0a 2b 09 20 20 20 20 72 65 74 75 }.+. retu
4050: 72 6e 20 24 72 65 73 0a 2b 09 7d 0a 2b 09 6a 6f rn $res.+.}.+.jo
4060: 69 6e 20 5b 6c 72 61 6e 67 65 20 5b 75 70 6c 65 in [lrange [uple
4070: 76 65 6c 20 5c 23 30 20 7b 0a 2b 09 20 20 20 20 vel \#0 {.+.
4080: 73 65 74 20 79 20 44 4c 2e 0a 2b 09 20 20 20 20 set y DL..+.
4090: 65 74 72 61 63 65 0a 2b 09 7d 5d 20 30 20 32 5d etrace.+.}] 0 2]
40a0: 20 5c 6e 0a 2b 20 20 20 20 7d 0a 2b 7d 20 2d 72 \n.+ }.+} -r
40b0: 65 73 75 6c 74 20 7b 2a 20 7b 74 79 70 65 20 73 esult {* {type s
40c0: 6f 75 72 63 65 20 6c 69 6e 65 20 31 39 34 34 20 ource line 1944
40d0: 66 69 6c 65 20 69 6e 66 6f 2e 74 65 73 74 20 63 file info.test c
40e0: 6d 64 20 7b 69 6e 66 6f 20 66 72 61 6d 65 20 24 md {info frame $
40f0: 6c 65 76 65 6c 7d 20 70 72 6f 63 20 3a 3a 65 74 level} proc ::et
4100: 72 61 63 65 20 6c 65 76 65 6c 20 30 7d 0a 2b 2a race level 0}.+*
4110: 20 7b 74 79 70 65 20 73 6f 75 72 63 65 20 6c 69 {type source li
4120: 6e 65 20 31 39 35 31 20 66 69 6c 65 20 69 6e 66 ne 1951 file inf
4130: 6f 2e 74 65 73 74 20 63 6d 64 20 65 74 72 61 63 o.test cmd etrac
4140: 65 20 6c 65 76 65 6c 20 31 7d 0a 2b 2a 20 7b 74 e level 1}.+* {t
4150: 79 70 65 20 73 6f 75 72 63 65 20 6c 69 6e 65 20 ype source line
4160: 31 39 34 39 20 66 69 6c 65 20 69 6e 66 6f 2e 74 1949 file info.t
4170: 65 73 74 20 63 6d 64 20 75 70 6c 65 76 65 6c 5c est cmd uplevel\
4180: 5c 20 5c 5c 5c 5c 20 6c 65 76 65 6c 20 31 7d 7d \ \\\\ level 1}}
4190: 20 2d 63 6c 65 61 6e 75 70 20 7b 69 6e 74 65 72 -cleanup {inter
41a0: 70 20 64 65 6c 65 74 65 20 73 75 62 7d 0a 2b 0a p delete sub}.+.
41b0: 2b 23 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d +# -------------
41c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
41d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
41e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
41f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 20 75 6e ------------. un
4200: 73 65 74 20 2d 6e 6f 63 6f 6d 70 6c 61 69 6e 20 set -nocomplain
4210: 72 65 73 0a 20 0a 20 23 20 63 6c 65 61 6e 75 70 res. . # cleanup
4220: 0a 2d 2d 2d 20 74 63 6c 38 36 2e 6f 72 69 67 2f .--- tcl86.orig/
4230: 74 65 73 74 73 2f 69 6e 74 65 72 70 2e 74 65 73 tests/interp.tes
4240: 74 09 32 30 31 30 2d 31 30 2d 30 34 20 31 35 3a t.2010-10-04 15:
4250: 34 39 3a 32 32 2e 30 30 30 30 30 30 30 30 30 20 49:22.000000000
4260: 2d 30 37 30 30 0a 2b 2b 2b 20 74 63 6c 38 36 2f -0700.+++ tcl86/
4270: 74 65 73 74 73 2f 69 6e 74 65 72 70 2e 74 65 73 tests/interp.tes
4280: 74 09 32 30 31 30 2d 31 30 2d 30 34 20 31 35 3a t.2010-10-04 15:
4290: 35 30 3a 31 39 2e 30 30 30 30 30 30 30 30 30 20 50:19.000000000
42a0: 2d 30 37 30 30 0a 40 40 20 2d 33 31 2c 37 20 2b -0700.@@ -31,7 +
42b0: 33 31 2c 37 20 40 40 0a 20 7d 20 2d 72 65 73 75 31,7 @@. } -resu
42c0: 6c 74 20 7b 77 72 6f 6e 67 20 23 20 61 72 67 73 lt {wrong # args
42d0: 3a 20 73 68 6f 75 6c 64 20 62 65 20 22 69 6e 74 : should be "int
42e0: 65 72 70 20 63 6d 64 20 3f 61 72 67 20 2e 2e 2e erp cmd ?arg ...
42f0: 3f 22 7d 0a 20 74 65 73 74 20 69 6e 74 65 72 70 ?"}. test interp
4300: 2d 31 2e 32 20 7b 6f 70 74 69 6f 6e 73 20 66 6f -1.2 {options fo
4310: 72 20 69 6e 74 65 72 70 20 63 6f 6d 6d 61 6e 64 r interp command
4320: 7d 20 2d 72 65 74 75 72 6e 43 6f 64 65 73 20 65 } -returnCodes e
4330: 72 72 6f 72 20 2d 62 6f 64 79 20 7b 0a 20 20 20 rror -body {.
4340: 20 20 69 6e 74 65 72 70 20 66 72 6f 62 6f 78 0a interp frobox.
4350: 2d 7d 20 2d 72 65 73 75 6c 74 20 7b 62 61 64 20 -} -result {bad
4360: 6f 70 74 69 6f 6e 20 22 66 72 6f 62 6f 78 22 3a option "frobox":
4370: 20 6d 75 73 74 20 62 65 20 61 6c 69 61 73 2c 20 must be alias,
4380: 61 6c 69 61 73 65 73 2c 20 62 67 65 72 72 6f 72 aliases, bgerror
4390: 2c 20 63 61 6e 63 65 6c 2c 20 63 72 65 61 74 65 , cancel, create
43a0: 2c 20 64 65 6c 65 74 65 2c 20 65 76 61 6c 2c 20 , delete, eval,
43b0: 65 78 69 73 74 73 2c 20 65 78 70 6f 73 65 2c 20 exists, expose,
43c0: 68 69 64 65 2c 20 68 69 64 64 65 6e 2c 20 69 73 hide, hidden, is
43d0: 73 61 66 65 2c 20 69 6e 76 6f 6b 65 68 69 64 64 safe, invokehidd
43e0: 65 6e 2c 20 6c 69 6d 69 74 2c 20 6d 61 72 6b 74 en, limit, markt
43f0: 72 75 73 74 65 64 2c 20 72 65 63 75 72 73 69 6f rusted, recursio
4400: 6e 6c 69 6d 69 74 2c 20 73 6c 61 76 65 73 2c 20 nlimit, slaves,
4410: 73 68 61 72 65 2c 20 74 61 72 67 65 74 2c 20 6f share, target, o
4420: 72 20 74 72 61 6e 73 66 65 72 7d 0a 2b 7d 20 2d r transfer}.+} -
4430: 72 65 73 75 6c 74 20 7b 62 61 64 20 6f 70 74 69 result {bad opti
4440: 6f 6e 20 22 66 72 6f 62 6f 78 22 3a 20 6d 75 73 on "frobox": mus
4450: 74 20 62 65 20 61 6c 69 61 73 2c 20 61 6c 69 61 t be alias, alia
4460: 73 65 73 2c 20 62 67 65 72 72 6f 72 2c 20 63 61 ses, bgerror, ca
4470: 6e 63 65 6c 2c 20 63 72 65 61 74 65 2c 20 64 65 ncel, create, de
4480: 62 75 67 2c 20 64 65 6c 65 74 65 2c 20 65 76 61 bug, delete, eva
4490: 6c 2c 20 65 78 69 73 74 73 2c 20 65 78 70 6f 73 l, exists, expos
44a0: 65 2c 20 68 69 64 65 2c 20 68 69 64 64 65 6e 2c e, hide, hidden,
44b0: 20 69 73 73 61 66 65 2c 20 69 6e 76 6f 6b 65 68 issafe, invokeh
44c0: 69 64 64 65 6e 2c 20 6c 69 6d 69 74 2c 20 6d 61 idden, limit, ma
44d0: 72 6b 74 72 75 73 74 65 64 2c 20 72 65 63 75 72 rktrusted, recur
44e0: 73 69 6f 6e 6c 69 6d 69 74 2c 20 73 6c 61 76 65 sionlimit, slave
44f0: 73 2c 20 73 68 61 72 65 2c 20 74 61 72 67 65 74 s, share, target
4500: 2c 20 6f 72 20 74 72 61 6e 73 66 65 72 7d 0a 20 , or transfer}.
4510: 74 65 73 74 20 69 6e 74 65 72 70 2d 31 2e 33 20 test interp-1.3
4520: 7b 6f 70 74 69 6f 6e 73 20 66 6f 72 20 69 6e 74 {options for int
4530: 65 72 70 20 63 6f 6d 6d 61 6e 64 7d 20 7b 0a 20 erp command} {.
4540: 20 20 20 20 69 6e 74 65 72 70 20 64 65 6c 65 74 interp delet
4550: 65 0a 20 7d 20 22 22 0a 40 40 20 2d 34 39 2c 31 e. } "".@@ -49,1
4560: 33 20 2b 34 39 2c 31 33 20 40 40 0a 20 7d 20 2d 3 +49,13 @@. } -
4570: 72 65 73 75 6c 74 20 7b 77 72 6f 6e 67 20 23 20 result {wrong #
4580: 61 72 67 73 3a 20 73 68 6f 75 6c 64 20 62 65 20 args: should be
4590: 22 69 6e 74 65 72 70 20 73 6c 61 76 65 73 20 3f "interp slaves ?
45a0: 70 61 74 68 3f 22 7d 0a 20 74 65 73 74 20 69 6e path?"}. test in
45b0: 74 65 72 70 2d 31 2e 37 20 7b 6f 70 74 69 6f 6e terp-1.7 {option
45c0: 73 20 66 6f 72 20 69 6e 74 65 72 70 20 63 6f 6d s for interp com
45d0: 6d 61 6e 64 7d 20 2d 72 65 74 75 72 6e 43 6f 64 mand} -returnCod
45e0: 65 73 20 65 72 72 6f 72 20 2d 62 6f 64 79 20 7b es error -body {
45f0: 0a 20 20 20 20 20 69 6e 74 65 72 70 20 68 65 6c . interp hel
4600: 6c 6f 0a 2d 7d 20 2d 72 65 73 75 6c 74 20 7b 62 lo.-} -result {b
4610: 61 64 20 6f 70 74 69 6f 6e 20 22 68 65 6c 6c 6f ad option "hello
4620: 22 3a 20 6d 75 73 74 20 62 65 20 61 6c 69 61 73 ": must be alias
4630: 2c 20 61 6c 69 61 73 65 73 2c 20 62 67 65 72 72 , aliases, bgerr
4640: 6f 72 2c 20 63 61 6e 63 65 6c 2c 20 63 72 65 61 or, cancel, crea
4650: 74 65 2c 20 64 65 6c 65 74 65 2c 20 65 76 61 6c te, delete, eval
4660: 2c 20 65 78 69 73 74 73 2c 20 65 78 70 6f 73 65 , exists, expose
4670: 2c 20 68 69 64 65 2c 20 68 69 64 64 65 6e 2c 20 , hide, hidden,
4680: 69 73 73 61 66 65 2c 20 69 6e 76 6f 6b 65 68 69 issafe, invokehi
4690: 64 64 65 6e 2c 20 6c 69 6d 69 74 2c 20 6d 61 72 dden, limit, mar
46a0: 6b 74 72 75 73 74 65 64 2c 20 72 65 63 75 72 73 ktrusted, recurs
46b0: 69 6f 6e 6c 69 6d 69 74 2c 20 73 6c 61 76 65 73 ionlimit, slaves
46c0: 2c 20 73 68 61 72 65 2c 20 74 61 72 67 65 74 2c , share, target,
46d0: 20 6f 72 20 74 72 61 6e 73 66 65 72 7d 0a 2b 7d or transfer}.+}
46e0: 20 2d 72 65 73 75 6c 74 20 7b 62 61 64 20 6f 70 -result {bad op
46f0: 74 69 6f 6e 20 22 68 65 6c 6c 6f 22 3a 20 6d 75 tion "hello": mu
4700: 73 74 20 62 65 20 61 6c 69 61 73 2c 20 61 6c 69 st be alias, ali
4710: 61 73 65 73 2c 20 62 67 65 72 72 6f 72 2c 20 63 ases, bgerror, c
4720: 61 6e 63 65 6c 2c 20 63 72 65 61 74 65 2c 20 64 ancel, create, d
4730: 65 62 75 67 2c 20 64 65 6c 65 74 65 2c 20 65 76 ebug, delete, ev
4740: 61 6c 2c 20 65 78 69 73 74 73 2c 20 65 78 70 6f al, exists, expo
4750: 73 65 2c 20 68 69 64 65 2c 20 68 69 64 64 65 6e se, hide, hidden
4760: 2c 20 69 73 73 61 66 65 2c 20 69 6e 76 6f 6b 65 , issafe, invoke
4770: 68 69 64 64 65 6e 2c 20 6c 69 6d 69 74 2c 20 6d hidden, limit, m
4780: 61 72 6b 74 72 75 73 74 65 64 2c 20 72 65 63 75 arktrusted, recu
4790: 72 73 69 6f 6e 6c 69 6d 69 74 2c 20 73 6c 61 76 rsionlimit, slav
47a0: 65 73 2c 20 73 68 61 72 65 2c 20 74 61 72 67 65 es, share, targe
47b0: 74 2c 20 6f 72 20 74 72 61 6e 73 66 65 72 7d 0a t, or transfer}.
47c0: 20 74 65 73 74 20 69 6e 74 65 72 70 2d 31 2e 38 test interp-1.8
47d0: 20 7b 6f 70 74 69 6f 6e 73 20 66 6f 72 20 69 6e {options for in
47e0: 74 65 72 70 20 63 6f 6d 6d 61 6e 64 7d 20 2d 72 terp command} -r
47f0: 65 74 75 72 6e 43 6f 64 65 73 20 65 72 72 6f 72 eturnCodes error
4800: 20 2d 62 6f 64 79 20 7b 0a 20 20 20 20 20 69 6e -body {. in
4810: 74 65 72 70 20 2d 66 72 6f 62 6f 7a 0a 2d 7d 20 terp -froboz.-}
4820: 2d 72 65 73 75 6c 74 20 7b 62 61 64 20 6f 70 74 -result {bad opt
4830: 69 6f 6e 20 22 2d 66 72 6f 62 6f 7a 22 3a 20 6d ion "-froboz": m
4840: 75 73 74 20 62 65 20 61 6c 69 61 73 2c 20 61 6c ust be alias, al
4850: 69 61 73 65 73 2c 20 62 67 65 72 72 6f 72 2c 20 iases, bgerror,
4860: 63 61 6e 63 65 6c 2c 20 63 72 65 61 74 65 2c 20 cancel, create,
4870: 64 65 6c 65 74 65 2c 20 65 76 61 6c 2c 20 65 78 delete, eval, ex
4880: 69 73 74 73 2c 20 65 78 70 6f 73 65 2c 20 68 69 ists, expose, hi
4890: 64 65 2c 20 68 69 64 64 65 6e 2c 20 69 73 73 61 de, hidden, issa
48a0: 66 65 2c 20 69 6e 76 6f 6b 65 68 69 64 64 65 6e fe, invokehidden
48b0: 2c 20 6c 69 6d 69 74 2c 20 6d 61 72 6b 74 72 75 , limit, marktru
48c0: 73 74 65 64 2c 20 72 65 63 75 72 73 69 6f 6e 6c sted, recursionl
48d0: 69 6d 69 74 2c 20 73 6c 61 76 65 73 2c 20 73 68 imit, slaves, sh
48e0: 61 72 65 2c 20 74 61 72 67 65 74 2c 20 6f 72 20 are, target, or
48f0: 74 72 61 6e 73 66 65 72 7d 0a 2b 7d 20 2d 72 65 transfer}.+} -re
4900: 73 75 6c 74 20 7b 62 61 64 20 6f 70 74 69 6f 6e sult {bad option
4910: 20 22 2d 66 72 6f 62 6f 7a 22 3a 20 6d 75 73 74 "-froboz": must
4920: 20 62 65 20 61 6c 69 61 73 2c 20 61 6c 69 61 73 be alias, alias
4930: 65 73 2c 20 62 67 65 72 72 6f 72 2c 20 63 61 6e es, bgerror, can
4940: 63 65 6c 2c 20 63 72 65 61 74 65 2c 20 64 65 62 cel, create, deb
4950: 75 67 2c 20 64 65 6c 65 74 65 2c 20 65 76 61 6c ug, delete, eval
4960: 2c 20 65 78 69 73 74 73 2c 20 65 78 70 6f 73 65 , exists, expose
4970: 2c 20 68 69 64 65 2c 20 68 69 64 64 65 6e 2c 20 , hide, hidden,
4980: 69 73 73 61 66 65 2c 20 69 6e 76 6f 6b 65 68 69 issafe, invokehi
4990: 64 64 65 6e 2c 20 6c 69 6d 69 74 2c 20 6d 61 72 dden, limit, mar
49a0: 6b 74 72 75 73 74 65 64 2c 20 72 65 63 75 72 73 ktrusted, recurs
49b0: 69 6f 6e 6c 69 6d 69 74 2c 20 73 6c 61 76 65 73 ionlimit, slaves
49c0: 2c 20 73 68 61 72 65 2c 20 74 61 72 67 65 74 2c , share, target,
49d0: 20 6f 72 20 74 72 61 6e 73 66 65 72 7d 0a 20 74 or transfer}. t
49e0: 65 73 74 20 69 6e 74 65 72 70 2d 31 2e 39 20 7b est interp-1.9 {
49f0: 6f 70 74 69 6f 6e 73 20 66 6f 72 20 69 6e 74 65 options for inte
4a00: 72 70 20 63 6f 6d 6d 61 6e 64 7d 20 2d 72 65 74 rp command} -ret
4a10: 75 72 6e 43 6f 64 65 73 20 65 72 72 6f 72 20 2d urnCodes error -
4a20: 62 6f 64 79 20 7b 0a 20 20 20 20 20 69 6e 74 65 body {. inte
4a30: 72 70 20 2d 66 72 6f 62 6f 7a 20 2d 73 61 66 65 rp -froboz -safe
4a40: 0a 2d 7d 20 2d 72 65 73 75 6c 74 20 7b 62 61 64 .-} -result {bad
4a50: 20 6f 70 74 69 6f 6e 20 22 2d 66 72 6f 62 6f 7a option "-froboz
4a60: 22 3a 20 6d 75 73 74 20 62 65 20 61 6c 69 61 73 ": must be alias
4a70: 2c 20 61 6c 69 61 73 65 73 2c 20 62 67 65 72 72 , aliases, bgerr
4a80: 6f 72 2c 20 63 61 6e 63 65 6c 2c 20 63 72 65 61 or, cancel, crea
4a90: 74 65 2c 20 64 65 6c 65 74 65 2c 20 65 76 61 6c te, delete, eval
4aa0: 2c 20 65 78 69 73 74 73 2c 20 65 78 70 6f 73 65 , exists, expose
4ab0: 2c 20 68 69 64 65 2c 20 68 69 64 64 65 6e 2c 20 , hide, hidden,
4ac0: 69 73 73 61 66 65 2c 20 69 6e 76 6f 6b 65 68 69 issafe, invokehi
4ad0: 64 64 65 6e 2c 20 6c 69 6d 69 74 2c 20 6d 61 72 dden, limit, mar
4ae0: 6b 74 72 75 73 74 65 64 2c 20 72 65 63 75 72 73 ktrusted, recurs
4af0: 69 6f 6e 6c 69 6d 69 74 2c 20 73 6c 61 76 65 73 ionlimit, slaves
4b00: 2c 20 73 68 61 72 65 2c 20 74 61 72 67 65 74 2c , share, target,
4b10: 20 6f 72 20 74 72 61 6e 73 66 65 72 7d 20 0a 2b or transfer} .+
4b20: 7d 20 2d 72 65 73 75 6c 74 20 7b 62 61 64 20 6f } -result {bad o
4b30: 70 74 69 6f 6e 20 22 2d 66 72 6f 62 6f 7a 22 3a ption "-froboz":
4b40: 20 6d 75 73 74 20 62 65 20 61 6c 69 61 73 2c 20 must be alias,
4b50: 61 6c 69 61 73 65 73 2c 20 62 67 65 72 72 6f 72 aliases, bgerror
4b60: 2c 20 63 61 6e 63 65 6c 2c 20 63 72 65 61 74 65 , cancel, create
4b70: 2c 20 64 65 62 75 67 2c 20 64 65 6c 65 74 65 2c , debug, delete,
4b80: 20 65 76 61 6c 2c 20 65 78 69 73 74 73 2c 20 65 eval, exists, e
4b90: 78 70 6f 73 65 2c 20 68 69 64 65 2c 20 68 69 64 xpose, hide, hid
4ba0: 64 65 6e 2c 20 69 73 73 61 66 65 2c 20 69 6e 76 den, issafe, inv
4bb0: 6f 6b 65 68 69 64 64 65 6e 2c 20 6c 69 6d 69 74 okehidden, limit
4bc0: 2c 20 6d 61 72 6b 74 72 75 73 74 65 64 2c 20 72 , marktrusted, r
4bd0: 65 63 75 72 73 69 6f 6e 6c 69 6d 69 74 2c 20 73 ecursionlimit, s
4be0: 6c 61 76 65 73 2c 20 73 68 61 72 65 2c 20 74 61 laves, share, ta
4bf0: 72 67 65 74 2c 20 6f 72 20 74 72 61 6e 73 66 65 rget, or transfe
4c00: 72 7d 20 0a 20 74 65 73 74 20 69 6e 74 65 72 70 r} . test interp
4c10: 2d 31 2e 31 30 20 7b 6f 70 74 69 6f 6e 73 20 66 -1.10 {options f
4c20: 6f 72 20 69 6e 74 65 72 70 20 63 6f 6d 6d 61 6e or interp comman
4c30: 64 7d 20 2d 72 65 74 75 72 6e 43 6f 64 65 73 20 d} -returnCodes
4c40: 65 72 72 6f 72 20 2d 62 6f 64 79 20 7b 0a 20 20 error -body {.
4c50: 20 20 20 69 6e 74 65 72 70 20 74 61 72 67 65 74 interp target
4c60: 0a 20 7d 20 2d 72 65 73 75 6c 74 20 7b 77 72 6f . } -result {wro
4c70: 6e 67 20 23 20 61 72 67 73 3a 20 73 68 6f 75 6c ng # args: shoul
4c80: 64 20 62 65 20 22 69 6e 74 65 72 70 20 74 61 72 d be "interp tar
4c90: 67 65 74 20 70 61 74 68 20 61 6c 69 61 73 22 7d get path alias"}
4ca0: 0a 40 40 20 2d 33 35 39 37 2c 36 20 2b 33 35 39 .@@ -3597,6 +359
4cb0: 37 2c 35 30 20 40 40 0a 20 20 20 20 20 69 6e 74 7,50 @@. int
4cc0: 65 72 70 20 64 65 6c 65 74 65 20 61 0a 20 7d 20 erp delete a. }
4cd0: 2d 72 65 73 75 6c 74 20 7b 32 36 20 32 36 7d 0a -result {26 26}.
4ce0: 20 0c 0a 2b 74 65 73 74 20 69 6e 74 65 72 70 2d ..+test interp-
4cf0: 33 38 2e 31 20 7b 69 6e 74 65 72 70 20 64 65 62 38.1 {interp deb
4d00: 75 67 20 6f 6e 65 2d 77 61 79 20 73 77 69 74 63 ug one-way switc
4d10: 68 7d 20 2d 73 65 74 75 70 20 7b 0a 2b 20 20 20 h} -setup {.+
4d20: 20 63 61 74 63 68 20 7b 69 6e 74 65 72 70 20 64 catch {interp d
4d30: 65 6c 65 74 65 20 61 7d 0a 2b 20 20 20 20 69 6e elete a}.+ in
4d40: 74 65 72 70 20 63 72 65 61 74 65 20 61 0a 2b 20 terp create a.+
4d50: 20 20 20 69 6e 74 65 72 70 20 64 65 62 75 67 20 interp debug
4d60: 61 20 2d 66 72 61 6d 65 20 31 0a 2b 7d 20 2d 62 a -frame 1.+} -b
4d70: 6f 64 79 20 7b 0a 2b 20 20 20 20 23 20 54 49 50 ody {.+ # TIP
4d80: 20 23 33 78 78 20 69 6e 74 65 72 70 20 64 65 62 #3xx interp deb
4d90: 75 67 20 66 72 61 6d 65 20 69 73 20 61 20 6f 6e ug frame is a on
4da0: 65 2d 77 61 79 20 73 77 69 74 63 68 0a 2b 20 20 e-way switch.+
4db0: 20 20 69 6e 74 65 72 70 20 64 65 62 75 67 20 61 interp debug a
4dc0: 20 2d 66 72 61 6d 65 20 30 0a 2b 7d 20 2d 63 6c -frame 0.+} -cl
4dd0: 65 61 6e 75 70 20 7b 0a 2b 20 20 20 20 69 6e 74 eanup {.+ int
4de0: 65 72 70 20 64 65 6c 65 74 65 20 61 0a 2b 7d 20 erp delete a.+}
4df0: 2d 72 65 73 75 6c 74 20 7b 31 7d 0a 2b 74 65 73 -result {1}.+tes
4e00: 74 20 69 6e 74 65 72 70 2d 33 38 2e 32 20 7b 69 t interp-38.2 {i
4e10: 6e 74 65 72 70 20 64 65 62 75 67 20 65 6e 76 20 nterp debug env
4e20: 76 61 72 7d 20 2d 73 65 74 75 70 20 7b 0a 2b 20 var} -setup {.+
4e30: 20 20 20 63 61 74 63 68 20 7b 69 6e 74 65 72 70 catch {interp
4e40: 20 64 65 6c 65 74 65 20 61 7d 0a 2b 20 20 20 20 delete a}.+
4e50: 73 65 74 20 3a 3a 65 6e 76 28 54 43 4c 5f 49 4e set ::env(TCL_IN
4e60: 54 45 52 50 5f 44 45 42 55 47 5f 46 52 41 4d 45 TERP_DEBUG_FRAME
4e70: 29 20 31 0a 2b 20 20 20 20 69 6e 74 65 72 70 20 ) 1.+ interp
4e80: 63 72 65 61 74 65 20 61 0a 2b 7d 20 2d 62 6f 64 create a.+} -bod
4e90: 79 20 7b 0a 2b 20 20 20 20 69 6e 74 65 72 70 20 y {.+ interp
4ea0: 64 65 62 75 67 20 61 0a 2b 7d 20 2d 63 6c 65 61 debug a.+} -clea
4eb0: 6e 75 70 20 7b 0a 2b 20 20 20 20 75 6e 73 65 74 nup {.+ unset
4ec0: 20 3a 3a 65 6e 76 28 54 43 4c 5f 49 4e 54 45 52 ::env(TCL_INTER
4ed0: 50 5f 44 45 42 55 47 5f 46 52 41 4d 45 29 0a 2b P_DEBUG_FRAME).+
4ee0: 20 20 20 20 69 6e 74 65 72 70 20 64 65 6c 65 74 interp delet
4ef0: 65 20 61 0a 2b 7d 20 2d 72 65 73 75 6c 74 20 7b e a.+} -result {
4f00: 2d 66 72 61 6d 65 20 31 7d 0a 2b 74 65 73 74 20 -frame 1}.+test
4f10: 69 6e 74 65 72 70 2d 33 38 2e 33 20 7b 69 6e 74 interp-38.3 {int
4f20: 65 72 70 20 64 65 62 75 67 20 77 72 6f 6e 67 20 erp debug wrong
4f30: 61 72 67 73 7d 20 2d 62 6f 64 79 20 7b 0a 2b 20 args} -body {.+
4f40: 20 20 20 69 6e 74 65 72 70 20 64 65 62 75 67 0a interp debug.
4f50: 2b 7d 20 2d 72 65 74 75 72 6e 43 6f 64 65 73 20 +} -returnCodes
4f60: 7b 0a 2b 20 20 20 20 65 72 72 6f 72 0a 2b 7d 20 {.+ error.+}
4f70: 2d 72 65 73 75 6c 74 20 7b 77 72 6f 6e 67 20 23 -result {wrong #
4f80: 20 61 72 67 73 3a 20 73 68 6f 75 6c 64 20 62 65 args: should be
4f90: 20 22 69 6e 74 65 72 70 20 64 65 62 75 67 20 70 "interp debug p
4fa0: 61 74 68 20 3f 2d 66 72 61 6d 65 20 3f 62 6f 6f ath ?-frame ?boo
4fb0: 6c 3f 3f 22 7d 0a 2b 74 65 73 74 20 69 6e 74 65 l??"}.+test inte
4fc0: 72 70 2d 33 38 2e 34 20 7b 69 6e 74 65 72 70 20 rp-38.4 {interp
4fd0: 64 65 62 75 67 20 62 61 73 69 63 20 73 65 74 75 debug basic setu
4fe0: 70 7d 20 2d 62 6f 64 79 20 7b 0a 2b 20 20 20 20 p} -body {.+
4ff0: 69 6e 74 65 72 70 20 64 65 62 75 67 20 7b 7d 0a interp debug {}.
5000: 2b 7d 20 2d 72 65 73 75 6c 74 20 7b 2d 66 72 61 +} -result {-fra
5010: 6d 65 20 30 7d 0a 2b 74 65 73 74 20 69 6e 74 65 me 0}.+test inte
5020: 72 70 2d 33 38 2e 35 20 7b 69 6e 74 65 72 70 20 rp-38.5 {interp
5030: 64 65 62 75 67 20 62 61 73 69 63 20 73 65 74 75 debug basic setu
5040: 70 7d 20 2d 62 6f 64 79 20 7b 0a 2b 20 20 20 20 p} -body {.+
5050: 69 6e 74 65 72 70 20 64 65 62 75 67 20 7b 7d 20 interp debug {}
5060: 2d 66 0a 2b 7d 20 2d 72 65 73 75 6c 74 20 7b 30 -f.+} -result {0
5070: 7d 0a 2b 74 65 73 74 20 69 6e 74 65 72 70 2d 33 }.+test interp-3
5080: 38 2e 36 20 7b 69 6e 74 65 72 70 20 64 65 62 75 8.6 {interp debu
5090: 67 20 62 61 73 69 63 20 73 65 74 75 70 7d 20 2d g basic setup} -
50a0: 62 6f 64 79 20 7b 0a 2b 20 20 20 20 69 6e 74 65 body {.+ inte
50b0: 72 70 20 64 65 62 75 67 20 2d 66 72 61 6d 65 73 rp debug -frames
50c0: 0a 2b 7d 20 2d 72 65 74 75 72 6e 43 6f 64 65 73 .+} -returnCodes
50d0: 20 65 72 72 6f 72 20 2d 72 65 73 75 6c 74 20 7b error -result {
50e0: 63 6f 75 6c 64 20 6e 6f 74 20 66 69 6e 64 20 69 could not find i
50f0: 6e 74 65 72 70 72 65 74 65 72 20 22 2d 66 72 61 nterpreter "-fra
5100: 6d 65 73 22 7d 0a 2b 74 65 73 74 20 69 6e 74 65 mes"}.+test inte
5110: 72 70 2d 33 38 2e 37 20 7b 69 6e 74 65 72 70 20 rp-38.7 {interp
5120: 64 65 62 75 67 20 62 61 73 69 63 20 73 65 74 75 debug basic setu
5130: 70 7d 20 2d 62 6f 64 79 20 7b 0a 2b 20 20 20 20 p} -body {.+
5140: 69 6e 74 65 72 70 20 64 65 62 75 67 20 7b 7d 20 interp debug {}
5150: 2d 66 72 61 6d 65 73 0a 2b 7d 20 2d 72 65 74 75 -frames.+} -retu
5160: 72 6e 43 6f 64 65 73 20 65 72 72 6f 72 20 2d 72 rnCodes error -r
5170: 65 73 75 6c 74 20 7b 62 61 64 20 64 65 62 75 67 esult {bad debug
5180: 20 6f 70 74 69 6f 6e 20 22 2d 66 72 61 6d 65 73 option "-frames
5190: 22 3a 20 6d 75 73 74 20 62 65 20 2d 66 72 61 6d ": must be -fram
51a0: 65 7d 0a 2b 74 65 73 74 20 69 6e 74 65 72 70 2d e}.+test interp-
51b0: 33 38 2e 38 20 7b 69 6e 74 65 72 70 20 64 65 62 38.8 {interp deb
51c0: 75 67 20 62 61 73 69 63 20 73 65 74 75 70 7d 20 ug basic setup}
51d0: 2d 62 6f 64 79 20 7b 0a 2b 20 20 20 20 69 6e 74 -body {.+ int
51e0: 65 72 70 20 64 65 62 75 67 20 7b 7d 20 2d 66 72 erp debug {} -fr
51f0: 61 6d 65 20 30 20 62 6f 67 75 73 0a 2b 7d 20 2d ame 0 bogus.+} -
5200: 72 65 74 75 72 6e 43 6f 64 65 73 20 7b 0a 2b 20 returnCodes {.+
5210: 20 20 20 65 72 72 6f 72 0a 2b 7d 20 2d 72 65 73 error.+} -res
5220: 75 6c 74 20 7b 77 72 6f 6e 67 20 23 20 61 72 67 ult {wrong # arg
5230: 73 3a 20 73 68 6f 75 6c 64 20 62 65 20 22 69 6e s: should be "in
5240: 74 65 72 70 20 64 65 62 75 67 20 70 61 74 68 20 terp debug path
5250: 3f 2d 66 72 61 6d 65 20 3f 62 6f 6f 6c 3f 3f 22 ?-frame ?bool??"
5260: 7d 0a 2b 0a 2b 0c 0a 20 23 20 63 6c 65 61 6e 75 }.+.+.. # cleanu
5270: 70 0a 20 66 6f 72 65 61 63 68 20 69 20 5b 69 6e p. foreach i [in
5280: 74 65 72 70 20 73 6c 61 76 65 73 5d 20 7b 0a 20 terp slaves] {.
5290: 20 20 20 20 69 6e 74 65 72 70 20 64 65 6c 65 74 interp delet
52a0: 65 20 24 69 0a e $i.