02.03.2014 Views

Tornado

Tornado

Tornado

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7<br />

Debugger<br />

7.7 Tcl: CrossWind Customization<br />

Like every other <strong>Tornado</strong> tool, the CrossWind graphical user interface is “soft”<br />

(amenable to customization) because it is written in Tcl, which is an interpreted<br />

language. <strong>Tornado</strong> API Guide: UI Tcl describes the graphical building blocks<br />

available; you can also study the Tcl implementation of CrossWind itself. You can<br />

find the source in host/resource/tcl/CrossWind.tcl.<br />

7.7.1 Tcl: Debugger Initialization Files<br />

7<br />

You can write Tcl code to customize the debugger’s graphical presentation in a file<br />

called .wind/crosswind.tcl under your home directory. Use this file to collect your<br />

custom modifications, or to incorporate shared customizations from a central<br />

repository of Tcl extensions at your site.<br />

Recall that the debugger uses two separate Tcl interpreters. Previous sections<br />

described the .gdbinit and ~/.wind/gdb.tcl initialization files that initialize the<br />

debugger command language (see 7.6 Tcl: Debugger Automation, p.266).<br />

The following outline summarizes the role of all the CrossWind customization<br />

files. The files are listed in the order in which they execute.<br />

~/.wind/gdb.tcl<br />

Use this file to customize the Tcl interpreter built into GDB itself (for example,<br />

to define Tcl procedures for new GDB commands). This file is unique to the<br />

CrossWind version of GDB.<br />

~/.gdbinit<br />

Use this file for any initialization you want to perform in GDB’s command<br />

language rather than in Tcl. This file is not unique to CrossWind; it is shared by<br />

any other GDB configuration you may install.<br />

${PWD}/.gdbinit<br />

Akin to the .gdbinit in your home directory, this file also contains commands<br />

in GDB’s command language, and is not unique to the CrossWind<br />

configuration of GDB. However, this file is specific to a particular working<br />

directory; thus it may be an appropriate place to record application-specific<br />

debugger settings.<br />

~/.wind/crosswind.tcl<br />

Use this file to customize the debugger’s graphical presentation, using Tcl: for<br />

example, to define new buttons or menu commands. This file is unique to the<br />

CrossWind version of GDB.<br />

273

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!