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.

<strong>Tornado</strong> 2.0<br />

User’s Guide<br />

You can prevent CrossWind from looking for the two .gdbinit files, if you choose,<br />

by setting the internal GDB parameter inhibit-gdbinit to yes. Because the<br />

initialization files execute in the order they are listed above, you have the<br />

opportunity to set this parameter before the debugger reads either .gdbinit file. To<br />

do this, insert the following line in your ~/.wind/gdb.tcl:<br />

gdb set inhibit-gdbinit yes<br />

7.7.2 Tcl: Passing Control between the Two CrossWind Interpreters<br />

You can use the following specialized Tcl commands to pass control between the<br />

two CrossWind Tcl interpreters.<br />

uptcl<br />

From the Tcl interpreter integrated with the GDB command parser, uptcl<br />

executes the remainder of the line in the CrossWind graphical-interface Tcl<br />

interpreter. uptcl does not return a result.<br />

downtcl<br />

From the graphical-interface layer, downtcl executes the remainder of the line<br />

in the Tcl interpreter integrated with GDB. The result of downtcl is whatever<br />

GDB output the command generates. Use downtcl rather than ttySend if your<br />

goal is to capture the result for presentation in the graphical layer.<br />

ttySend<br />

From the graphical-interface layer, ttySend passes its string argument to GDB,<br />

exactly as if you had typed the argument in the command panel. A newline is<br />

not assumed; if you are writing a command and want it to be executed, include<br />

the newline character (\n) at the end of the string. Use ttySend rather than<br />

downtcl if your goal is to make information appear in the command panel<br />

(this can be useful for providing information to other GDB prompts besides<br />

the command prompt).<br />

The major use of uptcl is to experiment with customizing or extending the<br />

graphical interface. For example, if you have a file myXWind containing<br />

experimental Tcl code for extending the interface, you can try it out by entering the<br />

following in the command panel:<br />

(gdb) tcl uptcl source myXWind<br />

By contrast, downtcl and ttySend are likely to be embedded in Tcl procedures,<br />

because (in conjunction with the commands discussed in 7.6.3 Tcl: Invoking GDB<br />

Facilities, p.268) they are the path to debugger functionality from the graphical<br />

front end.<br />

274

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

Saved successfully!

Ooh no, something went wrong!