Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
echo This is some text\n
echo which is continued\n
echo onto several lines.\n
output expression Print the value of expression and nothing but that
value: no newlines, no `$nn = '. The value is not
entered in the value history either. See
“Expressions” (page 76).
output/fmt expression Print the value of expression in format fmt. You
can use the same formats as for print. See “Output
formats” (page 79).
printf string, expressions... Print the values of the expressions under the
control of string. The expressions are
separated by commas and may be either numbers
or pointers. Their values are printed as specified
by string, exactly as if your program were to
execute the C subroutine
printf (string, expressions...);
For example, you can print two values in hex like
this:
printf "foo, bar-foo = 0x%x, 0x%x\n",
foo, bar-foo
The only backslash-escape sequences that you
can use in the format string are the simple ones
that consist of backslash followed by a letter.
18.4 Commands for controlled output 293