Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-07-04
04:02 • Ticket [219236ffff] Tcl_EvalEx() passes the wrong command size to EvalObjv()... artifact: c473b5af9f user: hobbs
2000-11-27
18:17 • Closed ticket [219236ffff]. artifact: 89a0c58de6 user: dkf
18:02 • Ticket [219236ffff]: 5 changes artifact: 2a56e02c49 user: dkf
2000-10-26
05:03 • New ticket [219236ffff]. artifact: 74ca5f065c user: nobody

Tcl_EvalEx() passes the wrong command size to EvalObjv()

Closed / Fixed219236ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 25 years ago
Descriptionplain2000-10-26 05:03:58
OriginalBugID: 4729 Bug
Version: 8.3
SubmitDate: '2000-03-30'
LastModified: '2000-04-03'
Severity: MED
Status: Assigned
Submitter: techsupp
ChangedBy: hobbs
OS: Solaris
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'


Name:
Yu Zhang

CVS:
* RCS: @(#) $Id: tclParse.c,v 1.13 1999/11/10 02:51:57 hobbs Exp $

ObservedBehavior:
I tried to integrate Don Libes tcl-debugger from expect5.31 with Tcl8.3.0 and found that all debugger functionality works except for breakpoint by pattern match. 
The reason of this problem is: Tcl_EvalEx() passes bytesLeft instead of parse.commandSize as the size of the command just parsed to EvalObjv(). EvalObjv() will call trace functions, including the debugger_trap() function, passing them the command string. Due to the wrong command size, the command string debugger_trap() gets is wrong, causing bogus breakpoints.



tclParse.c:1393 is the line in question.  The change passes the
test suites, but maybe only because it only affects C command traces,
in TclX and Expect.

Looking at the structure of Tcl_Parse, I would think that the
correct value is actually
    parse.commandStart + parse.commandSize
because you have to account for possible comments. 
-- 03/30/2000 hobbs
dkfplain2000-11-27 18:02:46
I'd have thought that parse.commandStart would be passed in instead, so as to skip over leading comments, with the length set to parse.commandSize.  Will implement it that way...
dkf Closed ticket [219236ffff]. [History diff]2000-11-27 18:17:36
hobbsplain2001-07-04 04:02:41
Logged In: YES 
user_id=72656

Patch is #402564:
https://sourceforge.net/tracker/index.php?
func=detail&aid=402564&group_id=10894&atid=310894
Log in (anonymous is fine) to add a comment.