How to read *.tbc file
hi all,
i having one file with extension '.tbc'.
i had tried to open it in simple text editor but not working.
can anyone guide me, how to open '.tbc' file
thanks
Adams
Answers
-
Hello,
it is compiled code, it's a text format but we cannot read
purpose of tbc is to hide source code of some authors
But in some case we can dump it back, for example if the codes were written in body of namespace or the codes is a part of a class (object-orient)
otherwise just the guys wrote tbcload and procomp know how to read tbc
0 -
yes code is written in namespace body.
can i convert the '.tbc' code in standard '.tcl' format?
thanks
Shivanshu
0 -
yes, you can get tcl codes of each compiled procedure by using
info args procname
info body procname
0 -
Altair Forum User said:
yes code is written in namespace body.
can i convert the '.tbc' code in standard '.tcl' format?
thanks
Shivanshu
Have a look at http://stackoverflow.com/questions/14633101/tbc-to-tcl-file
0 -
thanks for replying.
but i am not gettign the the way how exactly i have to convert the
'.tbc' to 'tcl'
please help with explained sol.
thanks
Adams
0 -
Hello
as i know there is no available tool to convert tbc file to tcl file
above guide just help you to be able to know what the tbc file do by dumping its detail actions
to dump a procedure explicitly, open command window and type in:
dump procname
if the procedure was pre-compiled, then nothing resulted
it (procedure) can be dumped if it is inside a namespace, an object or nested in a command (generated from a command)
0 -
Hello Tinh,
Do you know which free/opensource software to convert from *.tcl to *.tbc?
0 -
I am sorry because I don't know such a software.
But I can debug it to know how it acts. Because it will invoke other tcl commands, by tracing them we may know what's happening.
unfortunately, this is a terrible work, with tons of output need to be parsed
0 -
Hi Tĩnh.
I am sorry for making wrong explanation. I would like to know how to compile my tcl code to *.tbc in case I wanna protect my program.
0 -
Hi alpha,
I use this soft:
https://www.tcl.tk/software/tclpro/eval/1.4.html
newer versions are released by active-state
this v1.4 cannot compile newer syntax like {*}, expr with eq, ne, in, ni operators,...
0 -
Thanks Tinh so much for your information!
0 -
Altair Forum User said:
yes, you can get tcl codes of each compiled procedure by using
info args procname
info body procname
I have tried this way but I haven't got the body if code instead it is throwing me an error saying 'compiled -- no source code available'
Is there any other turnaround ?
0 -
Compiled script cannot be dumped by that way
Commands inside body of switch, [ ] ,... are exposed and can be traced, but no way to trace commands in level 1 of a proc because they are converted to bytecode
0 -
Tinh,
I have trying to get TclPro installed but the link isn't working anymore. Do you knwo weh i can download it and do you have an example of how to compile a script. Thank you for any help
0 -
Before, you can buy TclDevKit at ActiveState. But it's not possible from now.
In fact ActiveState have released TDK as OpenSource software: https://www.activestate.com/blog/tcl-dev-kit-now-open-source/
1