Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)
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 58).
output/fmt expression Print the value of expression in format fmt. You can use the
same formats as for print. See “Output formats” (page 60).
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.
Commands for controlled output 223