02.03.2014 Views

Tornado

Tornado

Tornado

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7<br />

Debugger<br />

gdbEvalScalar exprlist<br />

Evaluates a list of expressions exprlist and returns a list of single integer values<br />

(in hexadecimal), one for each element of exprlist. 6 If an expression represents<br />

a scalar value (such as int, long, or char), that value is returned. If an<br />

expression represents a float or double, the fractional part is truncated. If an<br />

expression represents an aggregate type, such as a structure or array, the<br />

address of the indicated object is returned. Standard rules for Tcl argument<br />

evaluation apply.<br />

If Tcl debugging is enabled, the following message is printed for each<br />

expression:<br />

7<br />

evaluate: expression<br />

If an expression does not evaluate to an object that can be cast to pointer type,<br />

an error message is printed, and gdbEvalScalar signals a Tcl error, which<br />

unwinds the Tcl stack if not caught (see B.2.9 Tcl Error Handling, p.324 for<br />

information about unwinding).<br />

gdbFileAddrInfo fileName<br />

Returns a Tcl list with four elements: the first source line number of fileName<br />

that corresponds to generated object code, the last such line number, the lowest<br />

object-code address from fileName in the target, and the highest object-code<br />

address from fileName in the target. The argument fileName must be the source<br />

file (.c, not .o) corresponding to code loaded in the target and in the debugger.<br />

For example:<br />

(gdb) tcl gdbFileAddrInfo vxColor.c<br />

{239 1058 0x39e2d0 0x39fbfc}<br />

gdbFileLineInfo fileName<br />

Returns a Tcl list with as many elements as there are source lines of fileName<br />

that correspond to generated object code. Each element of the list is itself a list<br />

with three elements: the source-file line number, the beginning address of<br />

object code for that line, and the ending address of object code for that line. The<br />

argument fileName must be the source file (.c, not .o) of a file corresponding to<br />

code loaded in the target and in the debugger.<br />

6. A more restricted form of this command, called gdbEvalAddress, can only evaluate a single<br />

expression (constructed by concatenating all its arguments). gdbEvalAddress is only<br />

supported to provide compatibility with Tcl debugger extensions written for an older<br />

debugger, VxGDB. Use the more general gdbEvalScalar in new Tcl extensions.<br />

269

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

Saved successfully!

Ooh no, something went wrong!