| Ticket UUID: | 95061fc746ea9d8d4c2c244e4f6daa3e6b472150 | ||
| Title: | Line number discrepency | ||
| Type: | Bug | Created on: | 2021-06-02 05:10:49 |
| Submitter: | anonymous | Assigned to: | nobody |
| Subsystem: | 17. Commands I-L | Severity: | Important |
| Priority: | 5 Medium | Last modified: | 2021-06-03 12:56:19 |
| Status: | Open | Closed by: | nobody |
| Resolution: | None | Closed on: | |
| Version: | |||
| Description: | ||||
My command interface is Tcl based and my aim is to know the line number of a particular command given in a file of Tcl commands. In order to know the line number of the command, I execute the following in my program.
get dict [info frame -1] line
This works perfectly in most cases. However, there is one corner case as below.
1: If { 1 } {
2: my_command1 -option1 { object1 \
3: object2 \
4 object3 }
5: my_command2 ….
6: }
For my_command1, I’m getting the line number correctly as 2. But my_command2, I’m getting the line number as 3 and not as 5.
If I try the same set of commands by commenting ‘if’ construct, I get line number of my_command2 correctly as 5!
1: #If { 1 } {
2: my_command1 -option1 { object1 \
3: object2 \
4 object3 }
5: my_command2 ….
6: #}
I’m wondering if this is a bug with Tcl ‘info frame’ command. Do you know if this is a known issue? Is there anything I could do to fix this problem?
Thanks and regards
| ||||
| User Comments: | ||||
sebres added on 2021-06-02 09:40:59:
Something seems to cause a loss for derived ICL data (invisible line continuation) on tcl-object supplied as option1 and further (recompile by epoch change?). Just I cannot reproduce this at all:
1. Which tcl-version do you use? anonymous added on 2021-06-03 12:56:19:
>1. Which tcl-version do you use? It's 8.6. >2. What command If basically is in your example? (note the uppercase "I", it is some derivative of tcl's "if" command or just a typo) Sorry, it's just a typo. It's actually 'if' command. >3. What commands my_commandN actually are (NRE or C-commands, TEBC-proc, tclOO)? These are some commands specific to the software I'm working on. >4. Can you provide some ready for tclsh real example illustrating this behavior? I'm not sure if I can do that without revealing proprietary information. The software uses it's own Tcl package, which has some specific software specific enhancements/requirements. Since you are not able to reproduce the issue using plain Tcl constructs, it maybe that the problem is specific to the enhancements done for the Tcl package. Will investigate more. Thanks for your attention! | ||||
