From: Tom Tromey Date: Wed, 14 Feb 2018 17:18:25 +0000 (-0700) Subject: Add usage to printf command X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=80ae639d3cc4f1e83f1ad48686f87417c06ca6dc;p=binutils-gdb.git 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 * printcmd.c (_initialize_printcmd): Add usage to printf. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f1b3b31e4d5..ba227ab62bb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2018-03-14 Tom Tromey + + * printcmd.c (_initialize_printcmd): Add usage to printf. + 2018-03-14 Yao Qi * MAINTAINERS: Update my email address. diff --git a/gdb/printcmd.c b/gdb/printcmd.c index fc9d7e4dd9a..13b967f0a2c 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\