From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11302 invoked by alias); 7 Mar 2013 10:08:49 -0000 Received: (qmail 11294 invoked by uid 22791); 7 Mar 2013 10:08:48 -0000 X-SWARE-Spam-Status: No, hits=-3.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 Mar 2013 10:08:40 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MJA00I00C29WF00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Thu, 07 Mar 2013 12:08:38 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MJA00HGXC6DCGU0@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Thu, 07 Mar 2013 12:08:38 +0200 (IST) Date: Thu, 07 Mar 2013 10:08:00 -0000 From: Eli Zaretskii Subject: [PATCH] Improve built-in documentation for pagination commands To: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <8338w71pzs.fsf@gnu.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-03/txt/msg00273.txt.bz2 I frequently waste too much time looking up these commands, because I constantly forget their names. So I decided to improve their doc strings so that 'apropos' will find them easier, and also to mention the special value of zero explicitly. Any objections to the changeset below? gdb/ChangeLog: 2013-03-07 Eli Zaretskii * utils.c (initialize_utils): Improve doc strings of "set/show width", "set/show height", and "set/show pagination". --- gdb/utils.c~0 2012-07-02 13:57:33.000000000 +0300 +++ gdb/utils.c 2013-03-07 12:01:41.951125000 +0200 @@ -2654,15 +2654,20 @@ initialize_utils (void) { add_setshow_uinteger_cmd ("width", class_support, &chars_per_line, _("\ -Set number of characters gdb thinks are in a line."), _("\ -Show number of characters gdb thinks are in a line."), NULL, +Set number of characters where GDB should wrap lines of its output."), _("\ +Show number of characters where GDB should wrap lines of its output."), _("\ +This affects where GDB wraps its output to fit the screen width.\n\ +Setting this to zero prevents GDB from wrapping its output."), set_width_command, show_chars_per_line, &setlist, &showlist); add_setshow_uinteger_cmd ("height", class_support, &lines_per_page, _("\ -Set number of lines gdb thinks are in a page."), _("\ -Show number of lines gdb thinks are in a page."), NULL, +Set number of lines in a page for GDB output pagination."), _("\ +Show number of lines in a page for GDB output pagination."), _("\ +This affects the number of lines after which GDB will pause\n\ +its output and ask you whether to continue.\n\ +Setting this to zero causes GDB never pause during output."), set_height_command, show_lines_per_page, &setlist, &showlist); @@ -2671,8 +2676,11 @@ add_setshow_boolean_cmd ("pagination", class_support, &pagination_enabled, _("\ -Set state of pagination."), _("\ -Show state of pagination."), NULL, +Set state of GDB output pagination."), _("\ +Show state of GDB output pagination."), _("\ +When pagination is ON, GDB pauses at end of each screenful of\n\ +its output and asks you whether to continue.\n\ +Turning pagination off is an alternative to \"set height 0\"."), NULL, show_pagination_enabled, &setlist, &showlist); gdb/testsuite/ChangeLog: 2013-03-07 Eli Zaretskii * gdb.base/help.exp: Adjust test case to match changes in GDB output of "set/show height", "set/show width", and "set/show pagination" commands. --- gdb/testsuite/gdb.base/help.exp~0 2012-07-02 20:53:19.000000000 +0300 +++ gdb/testsuite/gdb.base/help.exp 2013-03-07 12:03:02.607375000 +0200 @@ -401,7 +401,7 @@ # test help set environment gdb_test "help set environment" "Set environment variable value to give the program\.\[\r\n\]+Arguments are VAR VALUE where VAR is variable name and VALUE is value\.\[\r\n\]+VALUES of environment variables are uninterpreted strings\.\[\r\n\]+This does not affect the program until the next \"run\" command\." "help set environment" # test help set height -gdb_test "help set height" "Set number of lines gdb thinks are in a page\." "help set height" +gdb_test "help set height" "Set number of lines in a page for GDB output pagination\.\[\r\n\]+This affects the number of lines after which GDB will pause\[\r\n\]+its output and ask you whether to continue\.\[\r\n\]+Setting this to zero GDB never pauses during output\." "help set height" # test help set history expansion gdb_test "help set history expansion" "Set history expansion on command input\.\[\r\n\]+Without an argument, history expansion is enabled\." "help set history expansion" # test help set history filename @@ -463,7 +463,7 @@ # test help set verbose gdb_test "help set verbose" "Set verbosity\." "help set verbose" #test help set width -gdb_test "help set width" "Set number of characters gdb thinks are in a line\." "help set width" +gdb_test "help set width" "Set number of characters where GDB should wrap lines of its output.\.\[\r\n\]+This affects where GDB wraps its output to fit the screen width\.\[\r\n\]+Setting this to zero prevents GDB from wrapping its output\." "help set width" # test help set write # This is only supported on targets which use exec.o. gdb_test "help set write" "Set writing into executable and core files\." "help set write" @@ -514,7 +514,7 @@ # test help show environment gdb_test "help show environment" "The environment to give the program, or one variable's value\.\[\r\n\]+With an argument VAR, prints the value of environment variable VAR to\[\r\n\]+give the program being debugged\. With no arguments, prints the entire\[\r\n\]+environment to be given to the program\." "help show environment" # test help show height -gdb_test "help show height" "Show number of lines gdb thinks are in a page\." "help show height" +gdb_test "help show height" "Show number of lines in a page for GDB output pagination\.\[\r\n\]+This affects the number of lines after which GDB will pause\[\r\n\]+its output and ask you whether to continue\.\[\r\n\]+Setting this to zero GDB never pause during output\." "help show height" # test help show history expansion gdb_test "help show history expansion" "Show history expansion on command input\.\[\r\n\]+Without an argument, history expansion is enabled\." "help show history expansion" # test help show history filename @@ -578,7 +578,7 @@ # test help show version gdb_test "help show version" "Show what version of GDB this is\." "help show version" # test help show width -gdb_test "help show width" "Show number of characters gdb thinks are in a line\." "help show width" +gdb_test "help show width" "Show number of characters where GDB should wrap lines of its output\.\[\r\n\]+This affects where GDB wraps its output to fit the screen width\.\[\r\n\]+Setting this to zero prevents GDB from wrapping its output\." "help show width" # test help show write # This is only supported on targets which use exec.o. gdb_test "help show write" "Show writing into executable and core files\." "help show write"