aboutsummaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-02-14 10:18:25 -0700
committerTom Tromey <tom@tromey.com>2018-03-14 09:44:32 -0600
commit80ae639d3cc4f1e83f1ad48686f87417c06ca6dc (patch)
tree67c6e4502b191d6b71966958b8d17bb2c2a54081 /gdb/printcmd.c
parent0d671d99a6125e8406e4d06efb58542d3f0aa955 (diff)
downloadgdb-80ae639d3cc4f1e83f1ad48686f87417c06ca6dc.zip
gdb-80ae639d3cc4f1e83f1ad48686f87417c06ca6dc.tar.gz
gdb-80ae639d3cc4f1e83f1ad48686f87417c06ca6dc.tar.bz2
Add usage to printf command
This patch adds the "Usage:" text to the printf command's help text, and tries to improve the text a tiny bit. gdb/ChangeLog 2018-03-14 Tom Tromey <tom@tromey.com> * printcmd.c (_initialize_printcmd): Add usage to printf.
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index fc9d7e4..13b967f 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -2680,8 +2680,9 @@ No argument means cancel all automatic-display expressions.\n\
Do \"info display\" to see current list of code numbers."), &deletelist);
add_com ("printf", class_vars, printf_command, _("\
-printf \"printf format string\", arg1, arg2, arg3, ..., argn\n\
-This is useful for formatted output in user-defined commands."));
+Formatted printing, like the C \"printf\" function.\n\
+Usage: printf \"format string\", arg1, arg2, arg3, ..., argn\n\
+This supports most C printf format specifications, like %s, %d, etc."));
add_com ("output", class_vars, output_command, _("\
Like \"print\" but don't put in value history and don't print newline.\n\