1%----------------------------------------------------------------------------
2% Magic Maintainer's Manual number 1:  Installation and Development
3%----------------------------------------------------------------------------
4
5\NeedsTeXFormat{LaTeX2e}[1994/12/01]
6\documentclass[letterpaper,twoside,12pt]{article}
7\usepackage{epsfig,times}
8
9\setlength{\textwidth}{8.5in}
10\addtolength{\textwidth}{-2.0in}
11\setlength{\textheight}{11.0in}
12\addtolength{\textheight}{-2.0in}
13\setlength{\oddsidemargin}{0in}
14\setlength{\evensidemargin}{0pt}
15\setlength{\topmargin}{-0.5in}
16\setlength{\headheight}{0.2in}
17\setlength{\headsep}{0.3in}
18\setlength{\topskip}{0pt}
19
20\def\hinch{\hspace*{0.5in}}
21\def\starti{\begin{center}\begin{tabbing}\hinch\=\hinch\=
22	\hinch\=hinch\hinch\=\kill}
23\def\endi{\end{tabbing}\end{center}}
24\def\ii{\>\>\>}
25\def\mytitle{Magic Maintainer's Manual \#1: Installation and Development}
26
27%----------------------------------------------------------------------------
28
29\begin{document}
30
31\makeatletter
32\newcommand{\ps@magic}{%
33	\renewcommand{\@oddhead}{\mytitle\hfil\today}%
34	\renewcommand{\@evenhead}{\today\hfil\mytitle}%
35	\renewcommand{\@evenfoot}{\hfil\textrm{--{\thepage}--}\hfil}%
36	\renewcommand{\@oddfoot}{\@evenfoot}}
37\newcommand{\ps@mplain}{%
38	\renewcommand{\@oddhead}{}%
39	\renewcommand{\@evenhead}{}%
40	\renewcommand{\@evenfoot}{\hfil\textrm{--{\thepage}--}\hfil}%
41	\renewcommand{\@oddfoot}{\@evenfoot}}
42\makeatother
43\pagestyle{magic}
44\thispagestyle{mplain}
45
46
47\begin{center}
48  {\bfseries \Large \mytitle} \\
49  \vspace*{0.5in}
50  {\itshape John Ousterhout} \\
51  {\itshape Walter Scott} \\
52  \vspace*{0.5in}
53   Computer Science Division \\
54   Electrical Engineering and Computer Sciences \\
55   University of California \\
56   Berkeley, CA  94720 \\
57  \vspace*{0.25in}
58  {\itshape Tim Edwards} \\
59  MultiGiG, Inc. \\
60  Scotts Valley, CA 95014 \\
61  \vspace*{0.25in}
62  This manual corresponds to Magic version 7.4 \\
63\end{center}
64\vspace*{0.5in}
65
66{\noindent\bfseries\large Tutorials to read first:}
67\starti
68   \> Preferably all of them.
69\endi
70
71{\noindent\bfseries\large Commands introduced in this manual:}
72\starti
73   \> {\itshape (None)}
74\endi
75
76{\noindent\bfseries\large Macros introduced in this manual:}
77
78\starti
79   \> {\itshape (None)}
80\endi
81
82\vspace*{0.75in}
83\section{Introduction}
84
85This document provides some information to help system administrators
86and would-be Magic maintainers learn about the system.
87Before doing anything to the internals of Magic, you should read at
88least the first, and perhaps all four, of the papers on Magic that
89appeared together in the {\itshape 1984 Design Automation Conference}.
90In addition, the following portions of magic have their own papers:
91
92\starti
93   \> {\bfseries extractor} \ii {\itshape 1985 Design Automation
94	Conference}, page 286. \\
95   \> {\bfseries channel router} \ii {\itshape 1985 Chapel Hill Conference
96	on VLSI}, page 145. \\
97   \> {\bfseries irouter and mzrouter} \ii {\itshape 1988 Design
98	Automation Conference}, page 672. \\
99   \> {\bfseries resistance extractor} \ii {\itshape 1987 Design
100	Automation Conference}, page 570.
101\endi
102
103These documents are available from the Magic websites, which are another
104useful source of information regarding the program:
105
106\starti
107   \> {\bfseries\ttfamily http://vlsi.cornell.edu/magic} \\
108   \> {\bfseries\ttfamily http://opencircuitdesign.com/magic}
109\endi
110
111The source for Magic can be downloaded from either website.  Currently,
112the stable distribution release of Magic is version 7.4, and
113development version is 7.5.  This
114documentation refers to features of the stable distribution version.  For
115compilation instructions for the development version, please refer to the
116documentation in that distribution.  This document corresponds specifically
117to version 7.4.
118
119\section{Compiling and Installing Magic}
120
121The download file comes in tarred, gzipped format.  Normally, one will
122follow the standard procedure to uncompress and expand:
123
124\starti
125   \ii tar xzf magic-7.4.0.tar.gz \\
126   \ii cd magic-7.4.0
127\endi
128
129\section{Magic-7.4 Compile and Install}
130
131Magic 7.4 has a GNU ``autoconf'' method which automates most of the
132configuration process.  The compile and install process is thereby
133simplified to the following:
134
135\starti
136   \ii ./configure \\
137   \ii make \\
138   \ii make install
139\endi
140
141The autoconf process makes an effort to find the libraries and
142include files needed, including Tcl/Tk and OpenGL, and will compile
143Magic with support for these options unless they are specifically
144prohibited by an option to the {\ttfamily configure} script.  Options
145may also be used to specify where libraries and include files may
146be found, if they are in a nonstandard location and the
147{\ttfamily configure} script is unable to find them.  A full list
148of available options can be obtained by typing:
149
150\starti
151   \ii ./configure --help
152\endi
153
154The Tcl interpreter makes Magic a {\itshape package extension} of the
155Tcl language, rather than being embedded.  Tcl is largely compatible
156with Magic's existing command-line syntax, so Magic's command-line
157parser is simply given over to Tcl, and its graphics given over to Tk,
158the graphics interface for Tcl.  The Tcl version makes a GUI available
159for Magic, and provides numerous extensions to the program.  However,
160all critical functions are available with or without any compiled
161interpreter.
162
163The shell environment variable {\bfseries CAD{\_}HOME} exists as an
164override to the install path, so that Magic can be redirected to find its
165runtime files in a directory other than the location specified at
166compile time.  Generally, unless you know what you're doing, having an
167environment variable {\bfseries CAD{\_}HOME} is probably a bad idea.
168In versions prior to 7.2, it was necessary to have this set before running
169the program, so on systems that have had an older version of magic
170installed, user's startup files may contain such variable declarations,
171which should be removed.
172
173\section{Source Directory Structure} \label{structure}
174
175There are many source subdirectories in Magic.
176Most of these consist of modules of source code for the system,
177for example {\bfseries database}, {\bfseries cif}, and {\bfseries utils}.
178See Section~\ref{modules} of this document for brief descriptions of
179what's in each source directory.  Besides the source code,
180the other subdirectories are:
181
182\begin{itemize}
183\item {\bfseries doc} \\
184Contains sources for all the documentation, including {\itshape man}
185pages, tutorials, and maintenance manuals.
186Subdirectories of {\bfseries doc}, e.g. {\bfseries doc/scmos},
187contain some (outdated) technology manuals.
188The Makefile in each directory can be used to run
189off the documentation.  The tutorials, maintenance manuals,
190and technology manuals all use LaTeX, which means that you will need
191the LaTeX package to recompile the manuals from source.  Documentation
192is also available online in HTML format.
193
194\item {\bfseries magic} \\
195In addition to the source main() routine used for the non-Tcl-based
196compile option, this directory is where the modules of Magic are
197linked to form the executable version of the system.
198\end{itemize}
199
200Magic is a relatively large system:  there are around 575 source files,
201and 250,000 lines of C code.
202In order to make all
203of this manageable, we've organized the sources in a two-level
204structure.  Each module has its own subdirectory, and you can
205make changes to the module and recompile it by working
206within that subdirectory.
207
208There are two mailing lists associated with Magic development:
209\begin{enumerate}
210   \item {\ttfamily magic-hackers@csl.cornell.edu} is for general news
211	and discussions about the development process.
212   \item {\ttfamily magic-dev@csl.cornell.edu} is for developers only
213	and provides feedback on any CVS changes made in the repository.
214\end{enumerate}
215
216\section{Compiling and Installing }
217
218The top-level Makefile (\~{}cad/src/magic/Makefile) provides many options.
219
220The most useful Makefile options are:
221
222\begin{itemize}
223\item {\bfseries make magic} \\
224	Make a version of Magic.  All sub-modules are remade, if needed,
225	and then the final magic binary is produced.
226
227\item {\bfseries make everything} \\
228	Same as ``make magic''. Both options make auxilary programs like
229	{\bfseries ext2sim} and {\bfseries ext2spice}.
230
231\item {\bfseries make force} \\
232	Force recompilation.  Like a ``make everything'', except that object
233	files are first removed to force complete recompilation from scratch.
234
235\item {\bfseries make clean} \\
236	Delete files that can be remade, such as binaries, object, and
237	library files.
238
239\item {\bfseries make veryclean} \\
240	A more complete cleanup, that removes the current configuration
241	in addition to the files removed int the {\bfseries make clean}
242	step.
243
244\item {\bfseries make install} \\
245	Install the Magic binaries and run-time library files.
246	For Tcl, install the Magic shared-object files in the lib
247	directory, and install a shell script as the ``magic''
248	executable.
249\end{itemize}
250
251Putting together a runnable Magic system proceeds in two steps
252after a source file has been modified.  First, the source file
253is compiled, and all the files in its module are linked together
254into a single file {\itshape xyz}{\bfseries .o}, where {\itshape xyz}
255is the name of the module.  Then all of the modules are linked together
256to form an executable version of Magic.
257The command {\bfseries make} in each source directory will compile and
258link the module locally;  {\bfseries make install} will compile and
259link it.  All Makefiles are set up to use the compiler flags found
260in the source top-level directory file {\bfseries defs.mak}.
261
262\section{Summary of Magic Modules} \label{modules}
263
264This section contains brief summaries of what is in each of the Magic
265source subdirectories.  A number of files and directories were shifted
266around in the development of version 7.4, so this list has been
267updated accordingly.
268
269\begin{itemize}
270\item {\bfseries calma}  \\
271Contains code to read and write Calma (GDS-II) Stream-format files.  It
272uses many of the procedures in the {\bfseries cif} module.
273
274\item {\bfseries cif}  \\
275Contains code to process the CIF sections of technology
276files, and to generate CIF files from Magic.
277
278\item {\bfseries cmwind}  \\
279Contains code to implement special windows for editing color maps.
280
281\item {\bfseries commands}  \\
282The procedures in this module contain the top-level command
283routines for layout commands (commands that are
284valid in all windows are handled in the {\bfseries windows} module).
285These routines generally just parse the commands, check for
286errors, and call other routines to carry out the actions.
287
288\item {\bfseries database}  \\
289This is the largest and most important Magic module.  It
290implements the hierarchical corner-stitched database, and
291reads and writes Magic files.
292
293\item {\bfseries dbwind}  \\
294Provides display functions specific to layout windows, including managing
295the box, redisplaying layout, and displaying highlights and feedback.
296
297\item {\bfseries debug}  \\
298There's not much in this module, just a few routines used for
299debugging purposes.
300
301\item {\bfseries drc}  \\
302This module contains the incremental design-rule checker.  It
303contains code to read the {\bfseries drc} sections of technology files,
304record areas to be rechecked, and recheck those areas in
305a hierarchical fashion.
306
307\item {\bfseries ext2sim} \\
308This is another self-contained program.  It's
309a self-contained program that flattens the hierarchical {\bfseries .ext}
310files generated by Magic's extractor into a single file in {\bfseries .sim}
311format.  See the manual page {\bfseries ext2sim~(1)}.
312
313\item {\bfseries ext2spice}  \\
314This is another self-contained program.  It converts {\bfseries .ext}
315files into single file in spice format.
316See the manual page {\bfseries ext2spice~(1)}.
317
318\item {\bfseries extcheck}  \\
319Yet another independent program.  This one checks the {\bfseries .ext}
320files for global node connectivity and summarizes the number of FETs,
321nodes, etc.  See the manual page {\bfseries extcheck~(1)}.
322
323\item {\bfseries extflat}  \\
324Contains code that is used by the {\bfseries extract} module and the
325{\bfseries ext2\dots}
326programs.  The module produces a library that is linked in with the above
327programs.
328
329\item {\bfseries extract}  \\
330Contains code to read the {\bfseries extract} sections of technology files,
331and to generate hierarchical circuit descriptions ({\bfseries .ext} files)
332from Magic layouts.
333
334\item {\bfseries gcr}  \\
335Contains the channel router, which is an extension of Rivest's
336greedy router that can handle switchboxes and obstacles in the
337channels.
338
339\item {\bfseries graphics} \\
340This is the lowest-level graphics module.  It contains driver
341routines for X11 and OpenGL as well as the equivalent versions
342for use with Tk graphics under the Tcl-interpreter based version
343of Magic.  If you want to make Magic run on a new kind of
344display, this is the only module that should have to change.
345
346\item {\bfseries grouter}  \\
347The files in this module implement the global router, which
348computes the sequence of channels that each net is to pass
349through.
350
351\item {\bfseries irouter}  \\
352Contains the interactive router written by Michael Arnold at Lawrence
353Livermore National Labs.  This router allows the user to route nets
354interactively,  using special hint layers to control the routing.
355
356\item {\bfseries lef}  \\
357This module contains the LEF and DEF file format handling routines.
358
359\item {\bfseries lisp}  \\
360This module contains code which, if the SCHEME option is chosen at
361compile time, implements the lisp-like ``scheme'' interpreter.
362Scheme enables magic commands to be executed in a programming
363language framework, so complex functions can be defined.
364
365\item {\bfseries magic}  \\
366Contains the C {\bfseries main()} routine, and, alternatively, the
367Tcl initialization functions which replace it in the Tcl shared-object
368extensions.  Also contains all of the Tcl interpreter supporting code,
369such as the GUI wrapper, and the shell script which launches Magic.
370
371\item {\bfseries mzrouter}  \\
372Contains maze routing routines that are used by the irouter and garouter
373modules.
374
375\item {\bfseries net2ir}  \\
376Contains a program to convert a netlist into irouter commands.
377
378\item {\bfseries netmenu}  \\
379Implements netlists and the special netlist-editing windows.
380
381\item {\bfseries oa}  \\
382A very spare framework for an experimental interface to the OpenAccess
383database.  This is barely functional and is not enabled by the default
384configuration.
385
386\item {\bfseries plot}  \\
387The internals of the {\bfseries plot} command.  Code to write
388PostScript and rendered PNM output formats.  Disabled legacy
389code exists for the raw pixel, versatec, and gremlin formats,
390which may be compiled in by adding the appropriate definitions
391to the {\bfseries defs.mak} file.
392
393\item {\bfseries plow}  \\
394This module contains the code to support the {\bfseries :plow}
395and {\bfseries :straighten} commands.
396
397\item {\bfseries readline} \\
398``readline'' is an independent library of routines implementing
399command-line history and editing.  Version 7.4 of magic uses GNU
400readline-4.3.
401
402\item {\bfseries resis}  \\
403Resis is a module that does better resistance extraction via
404the :extresis command.  Courtesy of Don Stark of Stanford.
405
406\item {\bfseries router}  \\
407Contains the top-level routing code, including procedures
408to read the router sections of technology files,
409chop free space up into channels, analyze obstacles, and paint
410back the results produced by the channel router.
411
412\item {\bfseries scripts} \\
413This is not a module, but contains all of the shell scripts used
414by the make process.
415
416\item {\bfseries select}  \\
417This module contains files that manage the selection.  The routines
418here provide facilities for making a selection, enumerating what's
419in the selection, and manipulating the selection in several ways,
420such as moving it or copying it.
421
422\item {\bfseries sim}  \\
423Provides an interactive interface to the simulator rsim.  Courtesy of
424Mike Chow of Stanford.
425
426\item {\bfseries tcltk}  \\
427Contains the principle code used for the interface to the Tcl/Tk
428interpreter, the Tcl scripts that are used by the interface, and
429the startup scripts.  Note that much of the Tcl/Tk calls are
430scattered throughout the code, especially in the {\bfseries
431graphics} and {\bfseries commands} subdirectories.
432
433\item {\bfseries textio}  \\
434The top-level command interpreter.  This module grabs commands
435from the keyboard or mouse and sends them to the window module
436for processing.  Also provides routines for message and error
437printout, and to manage the prompt on the screen.
438
439\item {\bfseries tiles}  \\
440Implements basic corner-stitched tile planes.  This module was
441separated from {\bfseries database} in order to allow other clients
442to use tile planes without using the other database facilities
443too.
444
445\item {\bfseries utils}  \\
446This module implements a whole bunch of utility procedures,
447including a geometry package for dealing with rectangles and
448points and transformations, a heap package, a hash table package,
449a stack package, a revised memory allocator, the argument parser
450(formerly in module ``parser''), the initialization routines
451(formerly in module ``main''), the netlist handler (not associated
452with the ``netmenu'' module), the undo/redo handler, the technology
453reading code (formerly in module ``tech''), and lots of other stuff.
454
455\item {\bfseries windows}  \\
456This is the overall window manager.  It keeps track of windows
457and calls clients (like {\bfseries dbwind} and {\bfseries cmwind}) to process
458window-specific operations such as redisplaying or processing
459commands.  Commands that are valid in all windows, such as
460resizing or moving windows, are implemented here.
461
462\item {\bfseries wiring}  \\
463The files in this directory implement the {\bfseries :wire} command.
464There are routines to select wiring material, add wire legs,
465and place contacts.
466\end{itemize}
467
468\section{Portability Issues} \label{porting}
469
470Magic runs on a variety of machines.  Running ``configure'' in the top-level
471source directory sets the compile-time options.
472If you are porting Magic, you will probably need to modify the file
473{\bfseries scripts/configure.in} to define the proper compile-time flags
474for your machine.  No changes should be made that would hamper Magic's
475operation on other machines.  Process the {\bfseries configure.in} file
476by doing {\bfseries cd scripts; autoconf}.  Note that the {\bfseries
477automake} program is not used in this process.  The {\bfseries configure}
478script is directed to produce not a Makefile, as usual, but to produce
479the {\bfseries defs.mak} file which is included by the Makefile.
480
481The top-level directory script {\bfseries configure} is a shell script
482wrapper for the actual autoconf-generated file {\bfseries
483scripts/configure}.  The indirect call serves two purposes:  All of
484the extra scripts required by autoconf can be kept in the {\bfseries
485scripts} subdirectory, and also the {\bfseries CFLAGS} environment
486variable can be set, allowing the compiler optimization flag to be
487disabled, resulting in an executable which is probably marginally
488slower, but much easier to debug.
489
490\section{Technology and Other Support Files}
491
492Besides the source code files, there are a number of other
493files that must be managed by Magic maintainers, including
494color maps, technology files, and other stuff.  Below is
495a listing of those files and where they are located.
496
497\subsection{Technology Files}
498
499See ``Magic Maintainer's Manual\ \#2: The Technology File'' for information on
500the contents of technology files.
501The sources for technology files are contained in the subdirectory
502{\bfseries tech}, in files like {\bfseries scmos.tech} and {\bfseries nmos.tech}.
503The technology files that Magic actually uses at runtime are kept in the
504directory {\bfseries /usr/local/lib/magic/sys};%$
505{\bfseries make install} in {\bfseries tech}
506will copy the sources to {\bfseries /usr/local/lib/magic/sys}.%$
507The installed versions of technology files have the extension {\bfseries .tech}.
508
509Historically, the techfile format version was embedded in the filename.
510The last version number to use this (27), is still accepted as a valid
511techfile filename (for example, {\bfseries nmos.tech27}, where {\bfseries 27} is a
512version number).  Now, the format number appears in the ``tech'' section of the
513tech file (the first section declared) as, e.g., ``format 28''.  Future
514changes to the tech version are expected to be backwardly compatible to version
51527, should query the format version from the file, and make adjustments as
516necessary to the read-in for backward compatibility.
517
518The technology files that are compiled and installed with the magic
519distribution are long outdated and useful mainly for demonstration purposes.
520A set of technology files corresponding to existing fabrication processes
521is available from Jeff Sondeen at ISI.  Others are available from the Magic
522website, and from MOSIS.
523
524\subsection{Display Styles}
525
526The display style file sources are contained in the source directory
527{\bfseries graphics}.  See ``Magic Maintainer's Manual\ \#3:  The Display Style
528and Glyph Files'' and the manual page {\itshape dstyle}~(5)
529for a description of their contents.
530{\bfseries Make install} in {\bfseries graphics} will copy the files to
531{\bfseries /usr/local/lib/magic/sys}, which is where Magic looks
532for them when it executes.
533
534\subsection{Glyph Files}
535
536Glyph files are described in Maintainer's Manual\ \#3 and the
537manual page {\itshape glyphs}~(5);  they define patterns that
538appear in the cursor.  The sources for glyph
539files appear in two places:  some of them are in {\bfseries graphics},
540in files like {\bfseries color.glyphs}, and some others are defined
541in {\bfseries windows/window}{\itshape XX}{\bfseries .glyphs}.
542When you {\bfseries make install} in
543those directories, the glyphs are copied to
544{\bfseries /usr/local/lib/magic/sys},%$
545which is where Magic looks for them when it executes.
546
547\subsection{Color Maps}
548
549The color map sources are also contained in the source directory {\bfseries graphics}.
550Color maps have names like {\bfseries mos.7bit.std.cmap},
551where {\bfseries mos} is the name of the technology style to which the color
552map applies,
553{\bfseries 7bit} is the display style,
554and {\bfseries std} is a type of monitor.
555If monitors
556have radically different phosphors, they may require different
557color maps to achieve the same affects.  Right now we only support
558the {\bfseries std} kind of monitor.  When Magic executes, it looks for
559color maps in {\bfseries /usr/local/lib/magic/sys};%$
560{\bfseries make install} in {\bfseries graphics}
561will copy them there.  Although color map files are textual,
562editing by hand is undesirable;  use Magic's color map editing
563window instead.
564
565\section{New Display Drivers}
566
567The most common kind of change that will be
568made to Magic is probably to adapt it for new kinds of color displays.
569Each display driver contains a standard collection of
570procedures to perform basic functions such as placing text,
571drawing filled rectangles, or changing the shape of the cursor.
572A table (defined in {\bfseries graphics/grMain.c}) holds the addresses
573of the routines for the current display driver.  At initialization
574time this table is filled in with the addresses of the routines
575for the particular display being used.  All graphics calls pass
576through the table.
577
578If you have a display other than the ones currently defined
579(X11 and OpenGL/GLX), and you want to build a
580new display driver, we recommend starting with the routines for
581the X11 (all the files in {\bfseries graphics} named
582{\bfseries grX11su}{\itshape n}{\bfseries .c}).
583Copy the files into a new set for your display,
584change the names of the routines, and modify them to perform
585the equivalent functions on your display.  Write an initialization
586routine like {\bfseries x11suSetDisplay}, and add information to the
587display type tables in {\bfseries graphics/grMain.c}.  At this point
588you should be all set.  There shouldn't be any need to modify
589anything outside of the graphics module.
590
591\section{Debugging}
592
593Magic works fine under GNU {\bfseries gdb}.  The Makefiles are set
594up to compile all files with the {\bfseries -g} switch, which creates
595debugging information.
596
597When Magic is compiled under the Tcl interpreter, however,
598one cannot run, e.g., ``{\bfseries gdb magic},'' because the
599magic executable is a script.  The proper way to run Tcl-based
600magic under a debugger is the following:
601
602\starti
603  \ii set pid=`ps --no-headers -o pid= -C wish` \\
604  \ii gdb program $pid
605\endi
606
607which is a simple invocation for Linux systems.  If it is not
608possible to get {\bf ps} to return a single process ID, the
609process ID can be obtained visually from the {\bf ps} command
610and given to {\bf gdb} as the process ID to attach to:
611
612\starti
613  \ii ps -C wish
614  \ii gdb program {\itshape process_ID}
615\endi
616
617wher the first command returns {\itshape process_ID}, the  process ID of
618the {\bfseries wish} process.  If the
619version of {\bfseries ps} on your system does not support the {\bfseries
620-C} option, there are other options that will report the {\bfseries wish}
621process.
622
623Because this method attaches to an already running program, this method
624does not work for capturing errors that occur during program startup.
625Note, however, that errors occurring during technology loading can be
626captured by attaching to the running process, then giving the command
627``{\bfseries tech load [tech filename]}'' to magic.  Otherwise, the
628procedure to attach to the process prior to initialization is the
629following:
630
631\starti
632  \ii gdb wish
633  \ii run
634  \ii set argc 3
635  \ii set argv \{-w -d OGL\}
636  \ii source /usr/local/lib/magic/tcl/magic.tcl
637\endi
638
639Note the necessity of setting variables {\bfseries argc} and {\bfseries
640argv} within Tcl to get the startup script to process them as if they
641were command-line arguments passed from the shell.  Any valid command-line
642arguments may be passed in this manner.  The debugger prompt can be reached
643by typing Ctrl-C.  Note that the Tk console window is not available when
644debugging, a minor inconvenience.
645
646\end{document}
647