Overview
| Artifact ID: | 3786b3431f0ec23747d78ca2abcf335057bc748b |
|---|---|
| Ticket: | 1695203fffffffffffffffffffffffffffffffff
[info frame] reports wrong line |
| User & Date: | mercurio on 2007-06-28 06:07:01 |
Changes
- icomment:
Logged In: YES user_id=44475 Originator: NO The same thing happens with continued lines. Try this in tclsh85: proc printStack {} { for {set i [info frame]} {$i >= 1} {incr i -1} { set d [info frame $i] switch [dict get $d type] { source {lappend stack "[dict get $d file] [dict get $d line]"} proc {lappend stack "[dict get $d proc] [dict get $d line]"} } } puts stderr [join $stack \n] } proc test {} { set x \ 1 printStack } test % tclsh85 test1.tcl test1.tcl 3 test1.tcl 20 test1.tcl 24 The line where printStack is invoked is 21, not 20. Remove the continued line at the beginning of test{} and the output is correct. I'm also seeing a lot of "proc" frames that have incorrect positive line numbers (probably due to the same line counting problem) or line numbers that are -1. I haven't been able to come up with a short example that demonstrates this, but it shows up repeatably in a debugger I'm trying to implement (using trace add exec .. enterstep). - login: "mercurio"
- mimetype: "text/plain"
- username: "mercurio"