From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5246 invoked by alias); 13 Aug 2012 20:29:07 -0000 Received: (qmail 5238 invoked by uid 22791); 13 Aug 2012 20:29:06 -0000 X-SWARE-Spam-Status: No, hits=-5.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vb0-f41.google.com (HELO mail-vb0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Aug 2012 20:28:43 +0000 Received: by vbkv13 with SMTP id v13so4502291vbk.0 for ; Mon, 13 Aug 2012 13:28:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-system-of-record:x-gm-message-state; bh=JzjPy7bXLfgCD9ePp2E6sYtYzvGT8n7/b7wMpDHAvXw=; b=N91+qvY90uSAQpdtZ5AoPRA/wXFQraEE/XHC4n8YBGf078eB4vOQiyT/0TkfI3F2v/ QkOP0qN/48kvCa5jj65fEiJeyzaUxAb4mRo+giXKkn3JmLajVji7c1Yw1NxbzWtxhw0n 0arBs6zfFrCAp6bRTCaiiBPd89GLfrp6VGmXIlR9ydDmFoGpo2sG83bVaKy0HMHfOcQn nXKsC+Z0annP8bTVTLm4Cgy4G8u9VCTmFPTE09vOy//hRGUgRYzHL6kc5C8FRRQPJZzk 1ObpmlM9R8LKF9b3s+hNqm8mFU7buThw9ZzRlsm9OtBVJe62RBkuO+RJIOG5kO4hxOID wLDw== Received: by 10.220.204.212 with SMTP id fn20mr8903394vcb.43.1344889722558; Mon, 13 Aug 2012 13:28:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.204.212 with SMTP id fn20mr8903385vcb.43.1344889722434; Mon, 13 Aug 2012 13:28:42 -0700 (PDT) Received: by 10.52.157.4 with HTTP; Mon, 13 Aug 2012 13:28:42 -0700 (PDT) In-Reply-To: <1344823549-24684-1-git-send-email-vapier@gentoo.org> References: <1344704080-24677-1-git-send-email-vapier@gentoo.org> <1344823549-24684-1-git-send-email-vapier@gentoo.org> Date: Mon, 13 Aug 2012 20:29:00 -0000 Message-ID: Subject: Re: [PATCH v2] gdb: improve usage strings From: Doug Evans To: Mike Frysinger Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true X-Gm-Message-State: ALoCoQkVLHNrDr3dLgt/c6CvYvNG4E0okot8dV4MztOR6Agsj1kCK+jnJ6OW6lQFlpcvdNZyf5IVD8TqwGZOxG+7KdfhdHSSN0u0rEKh0HlLVpRuac0o4NyKS+7Y7VFmIE5F5g7+9d6vR+prmquXItwW4DKkRV6HZ4FTxBTGKvQp1dQTZzbP3BqUA7yFAgJauR2nJFvOgnuVNwNGgF3LbriMugnUrgMn8A== 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: 2012-08/txt/msg00377.txt.bz2 On Sun, Aug 12, 2012 at 7:05 PM, Mike Frysinger wrote: > [...] > diff --git a/gdb/infcmd.c b/gdb/infcmd.c > index d56503c..78bfc04 100644 > --- a/gdb/infcmd.c > +++ b/gdb/infcmd.c > @@ -3017,40 +3017,45 @@ The target will wait for another debugger to connect. Not available for\n\ > all targets.")); > > c = add_com ("signal", class_run, signal_command, _("\ > -Continue program giving it signal specified by the argument.\n\ > -An argument of \"0\" means continue program without giving it a signal.")); > +Continue program and simultaneously send it the specified signal.\n\ > +Usage: signal SIGNAL\n\ > +An argument of \"0\" means continue the program without sending it a signal.")); > set_cmd_completer (c, signal_completer); That's ok I guess. How about "Continue program with the specified signal." ? Also, it would be good to augment the docs for "sig 0" to denote it can be used to resume a program and discard the signal that is pending for it, and would otherwise receive if you did a "continue". It's kinda implicit in the existing wording, but I've seen a few cases where more clarity would have helped. How about: An argument of "0" means continue the program without sending it a signal. This is useful in cases where the program stopped because of a signal, and you want to resume the program and discard the signal. Or some such. E.g. [I'm just using SIGINT as an example here.] (gdb) handle SIGINT stop print pass SIGINT is used by the debugger. Are you sure you want to change it? (y or n) y Signal Stop Print Pass to program Description SIGINT Yes Yes Yes Interrupt (gdb) r Starting program: /home/dje/forever.x64 C-c C-c Program received signal SIGINT, Interrupt. 0x00007ffff7b04680 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:82 82 ../sysdeps/unix/syscall-template.S: No such file or directory. (gdb) sig 0 Continuing with no signal. C-c C-c Program received signal SIGINT, Interrupt. 0x00007ffff7b04680 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:82 82 in ../sysdeps/unix/syscall-template.S (gdb) c Continuing. Program terminated with signal SIGINT, Interrupt. The program no longer exists. (gdb)