Re: Need a reliable way to determine the line of code being executed
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Need a reliable way to determine the line of code being executed

From: Artur <mail@xdobry.de>
Date: Tue Feb 28 2006 - 20:37:35 CET

Hi Mark!

There is directly no way to obtain this information (so I know it) but
the interpreter has it. See errorInfo message in some test programm.
You can read indeed the line of code in called proc. So this info is
there but
not accessible in normal case.

Some times ago a have worked on patched Tcl interpreter for
extended debugging. The problem of line number was also there.
I have patched Tcl this way that the line of code (in proc not source
file) was
stored on internal stack structure and serviced to debug API.
You will probably need to build your own patched interpreter you can
use also trace methods. You can use the code of my debugger as base

http://www.xdobry.de/atkdebugger
see chapter: Programming debugger

Artur
Received on Sun Apr 30 02:17:57 2006