From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72464 invoked by alias); 21 Mar 2015 17:05:42 -0000 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 Received: (qmail 72449 invoked by uid 89); 21 Mar 2015 17:05:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 21 Mar 2015 17:05:40 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2LH5cuD002607 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Sat, 21 Mar 2015 13:05:38 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2LH5avv026764; Sat, 21 Mar 2015 13:05:37 -0400 Message-ID: <550DA4DF.4060203@redhat.com> Date: Sat, 21 Mar 2015 17:05:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Cleber Rosa , gdb-patches@sourceware.org CC: areis@redhat.com Subject: Re: [PATCH 2/4] GDBServer: give more complete usage information References: <1426905265-8495-1-git-send-email-crosa@redhat.com> <1426905265-8495-3-git-send-email-crosa@redhat.com> In-Reply-To: <1426905265-8495-3-git-send-email-crosa@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-03/txt/msg00690.txt.bz2 On 03/21/2015 02:34 AM, Cleber Rosa wrote: > --attach/--multi are currently only mentioned on the usage info first lines, > the meaning of PROG is completely absent and COMM/PID text is unstructured. > > The words and structure chosen may not be perfect but IMHO this is an improvement. Thanks, indeed this is in clear need of TLC. I don't think we should put the FOO BAR options under structured output though. I don't think it's usual. Looking at a few core utils's --help, I saw none that did that. I think its better to just extend the intro part to explain PROG, etc. I went ahead and did that, along with a few more changes. Let me know what you think. Thanks! ------------ >From 2e305602202b753b29d4088ff722150dd7b7fccd Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Sat, 21 Mar 2015 17:00:23 +0000 Subject: [PATCH] GDBServer: give more complete usage information --attach/--multi are currently only mentioned on the usage info first lines, the meaning of PROG is completely absent and the COMM text does not mention 'stdio'. A few options are missing: . '-/stdio' is not mentioned as COMM variant. . --disable-randomization / --no-disable-randomization is not mentioned. Although the manual has a comment saying these are superceded by QDisableRandomization, that only makes sense for "run" in extended-remote mode. When we start gdbserver passing it a PROG, --disable-randomization / --no-disable-randomization do take effect. So I think we should document these. . We show --debug / --remote-debug, so might as well show --disable-packet too. GDB's --help has this "For more information, consult the GDB manual" blurb that is missing in GDBserver's --help. Then shuffle things around a bit into "Operating modes", "Other options" and "Debug options" sections, similarly to GDB's --help structure. Before: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ $ ./gdbserver/gdbserver --help Usage: gdbserver [OPTIONS] COMM PROG [ARGS ...] gdbserver [OPTIONS] --attach COMM PID gdbserver [OPTIONS] --multi COMM COMM may either be a tty device (for serial debugging), or HOST:PORT to listen for a TCP connection. Options: --debug Enable general debugging output. --debug-format=opt1[,opt2,...] Specify extra content in debugging output. Options: all none timestamp --remote-debug Enable remote protocol debugging output. --version Display version information and exit. --wrapper WRAPPER -- Run WRAPPER to start new programs. --once Exit after the first connection has closed. Report bugs to "". ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ After: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ $ ./gdbserver/gdbserver --help Usage: gdbserver [OPTIONS] COMM PROG [ARGS ...] gdbserver [OPTIONS] --attach COMM PID gdbserver [OPTIONS] --multi COMM COMM may either be a tty device (for serial debugging), HOST:PORT to listen for a TCP connection, or '-' or 'stdio' to use stdin/stdout of gdbserver. PROG is the executable program. ARGS are arguments passed to inferior. PID is the process ID to attach to, when --attach is specified. Operating modes: --attach Attach to running process PID. --multi Start server without a specific program, and only quit when explicitly commanded. --once Exit after the first connection has closed. --help Print this message and then exit. --version Display version information and exit. Other options: --wrapper WRAPPER -- Run WRAPPER to start new programs. --disable-randomization Run PROG with address space randomization disabled. --no-disable-randomization Don't disable address space randomization when starting PROG. Debug options: --debug Enable general debugging output. --debug-format=opt1[,opt2,...] Specify extra content in debugging output. Options: all none timestamp --remote-debug Enable remote protocol debugging output. --disable-packet=opt1[,opt2,...] Disable support for RSP packets or features. Options: vCont, Tthread, qC, qfThreadInfo and threads (disable all threading packets). For more information, consult the GDB manual (available as on-line info or a printed manual). Report bugs to "". ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gdb/gdbserver/ChangeLog: 2015-03-20 Pedro Alves Cleber Rosa * server.c (gdbserver_usage): Reorganize and extend the usage message. --- gdb/gdbserver/server.c | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 96b31b8..3408ef7 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -2996,10 +2996,32 @@ gdbserver_usage (FILE *stream) "\tgdbserver [OPTIONS] --attach COMM PID\n" "\tgdbserver [OPTIONS] --multi COMM\n" "\n" - "COMM may either be a tty device (for serial debugging), or \n" - "HOST:PORT to listen for a TCP connection.\n" + "COMM may either be a tty device (for serial debugging),\n" + "HOST:PORT to listen for a TCP connection, or '-' or 'stdio' to use \n" + "stdin/stdout of gdbserver.\n" + "PROG is the executable program. ARGS are arguments passed to inferior.\n" + "PID is the process ID to attach to, when --attach is specified.\n" + "\n" + "Operating modes:\n" + "\n" + " --attach Attach to running process PID.\n" + " --multi Start server without a specific program, and\n" + " only quit when explicitly commanded.\n" + " --once Exit after the first connection has closed.\n" + " --help Print this message and then exit.\n" + " --version Display version information and exit.\n" + "\n" + "Other options:\n" + "\n" + " --wrapper WRAPPER -- Run WRAPPER to start new programs.\n" + " --disable-randomization\n" + " Run PROG with address space randomization disabled.\n" + " --no-disable-randomization\n" + " Don't disable address space randomization when\n" + " starting PROG.\n" + "\n" + "Debug options:\n" "\n" - "Options:\n" " --debug Enable general debugging output.\n" " --debug-format=opt1[,opt2,...]\n" " Specify extra content in debugging output.\n" @@ -3008,10 +3030,14 @@ gdbserver_usage (FILE *stream) " none\n" " timestamp\n" " --remote-debug Enable remote protocol debugging output.\n" - " --version Display version information and exit.\n" - " --wrapper WRAPPER -- Run WRAPPER to start new programs.\n" - " --once Exit after the first connection has " - "closed.\n"); + " --disable-packet=opt1[,opt2,...]\n" + " Disable support for RSP packets or features.\n" + " Options:\n" + " vCont, Tthread, qC, qfThreadInfo and \n" + " threads (disable all threading packets).\n" + "\n" + "For more information, consult the GDB manual (available as on-line \n" + "info or a printed manual).\n"); if (REPORT_BUGS_TO[0] && stream == stdout) fprintf (stream, "Report bugs to \"%s\".\n", REPORT_BUGS_TO); } -- 1.9.3