print

Print value of expression EXP.

print [/FMT] EXP

Variables accessible are those of the lexical environment of the selected stack frame, plus all those whose scope is global or an entire file.

  • $NUM gets previous value number NUM. $ and $$ are the last two values.
  • $$NUM refers to NUM’th value back from the last one.
  • Names starting with $ refer to registers (with the values they would have if the program were to return to the stack frame now selected, restoring all registers saved by frames farther in) or else to debugger “convenience” variables (any such name not a known register).

Use assignment expressions to give values to convenience variables.

  • {TYPE}ADREXP refers to a datum of data type TYPE, located at address ADREXP.
  • @ is a binary operator for treating consecutive data objects anywhere in memory as an array. FOO@NUM gives an array whose first element is FOO, whose second element is stored in the space following where FOO is stored, etc. FOO must be an expression whose value resides in memory.

EXP may be preceded with /FMT, where FMT is a format letter but no count or size letter (see “x” command).