Many thnx for all of you that can help me to solve my problem...
---
ZEXEL
To the best of my knowledge no one has a .tbc -> .tcl tool.
--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
Side question: is the .tbc still in sync with the current in-memory
bytecode VM, or did they diverge at some point after the Scriptics
era ?
If yes, then maybe the code implementing ::tcl_traceCompile could be
adapted to disassemble tbc. After that, going back from text VM
instructions to some form of Tcl code would be an interesting project,
be it only for pedagogic purposes...
-Alex
Great, can you tell me how to use the ::tcl_traceCompile in tcl script
for disassemble .tbc file?
I have filename called: stoptest.tbc (545KB) and so I want
use ::tcl_traceCompile to disassemble it become .tcl again :)
Thx you very much...
--
ZEXEL
Great, can you tell me how to use the ::tcl_traceCompile in tcl script
Reread my answer. There is a question and a big If.
Last time I checked, .tbc's were only created by the non-free TclPro.
If you want to help, tell me the current status, and answer the
question of my previous post.
-Alex
They've actually been developed a few times that I'm aware of (well, to
at least the stage where deriving the script isn't too difficult) but
nobody distributes them. Such tools go against the principle of the .tbc
format, since there really isn't any reason to use it for anything other
than information hiding...
Donal.
Here's one idea if you can source your tbc file can't your use info
to rebuild your procs?
like so:
foreach p [info procs ] {
puts "proc $p \{ \n[info body $p ] \}"
}
No, precompiled bytecodes no longer contain their source representation.
The info body will give you nothing useful. This is one thing to be
watchful of if you try and copy procs on the fly for modification as
part of program design (this tripped me up once).
Jeff
you can use "trace add execution <your proc> enterstep logProcs" if
you remember the procs names and source the tbc file. the in logProcs
write the data into file for later re-costructing. it will be big task
but at least some of the part could be copied from the logging on the
procs.
also info procs can help you remember the proc names.