Technical data
ModelSim tools
232
-
ModelSim EE Graphic Interface ModelSim EE/PLUS Reference Manual
The Tcl Debu
gg
er
We would like to thank Gregor Schmid for making TDebug available for use in
the public domain.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of FITNESS FOR A
PARTICULAR PURPOSE.
Starting the debugger
TDebug is installed with Model
Sim
and is configured to run from the
Macro > Tcl
Debugger
menu selection. Make sure you use the Model
Sim
and TDebug menu
selections to invoke and close the debugger. If you would like more information
on the configuration of TDebug see
Help > Technotes > tdebug
.
The following text is an edited summary of the README file distributed with
TDebug.
How it works
TDebug works by parsing and redefining Tcl/Tk-procedures, inserting calls to
`td_eval' at certain points, which takes care of the display, stepping, breakpoints,
variables etc. The advantages are that TDebug knows which statement in what
procedure is currently being executed and can give visual feedback by
highlighting it. All currently accessible variables and their values are displayed as
well. Code can be evaluated in the context of the current procedure. Breakpoints
can be set and deleted with the mouse.
Unfortunately there are drawbacks to this approach. Preparation of large
procedures is slow and due to Tcl's dynamic nature there is no guarantee, that a
procedure can be prepared at all. This problem has been alleviated somewhat with
the introduction of partial preparation of procedures. There is still no possibility
to get at code running in the global context.
The Chooser
Open the TDebug chooser with the
Macro > Tcl Debugger
menu selection from
the Main Model
Sim
window.