Message ID | 20180917222334.27753-1-philippe.waroquiers@skynet.be |
---|---|
State | New, archived |
Headers |
Received: (qmail 84593 invoked by alias); 17 Sep 2018 22:23:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 84561 invoked by uid 89); 17 Sep 2018 22:23:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mailsec101.isp.belgacom.be Received: from mailsec101.isp.belgacom.be (HELO mailsec101.isp.belgacom.be) (195.238.20.97) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Sep 2018 22:23:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1537223023; x=1568759023; h=from:to:cc:subject:date:message-id; bh=EcvRC0xooRtFbjn5RHRksKaCSQn00vTToOr5p39WGW4=; b=E4IK3Ocyf8GL7NQ9ZoGf10Y/SwfQ/FW9r3AbAEneR4JczaCpD/LSGS/f p7q3V3qsOtl2Mwmf6R62lHoPOkD0eQ==; Received: from 65.33-242-81.adsl-dyn.isp.belgacom.be (HELO md.home) ([81.242.33.65]) by relay.skynet.be with ESMTP/TLS/DHE-RSA-AES128-GCM-SHA256; 18 Sep 2018 00:23:40 +0200 From: Philippe Waroquiers <philippe.waroquiers@skynet.be> To: gdb-patches@sourceware.org Cc: Philippe Waroquiers <philippe.waroquiers@skynet.be> Subject: [PATCH] [OBVIOUS] enable frame-filter short help uses disable instead of enable Date: Tue, 18 Sep 2018 00:23:34 +0200 Message-Id: <20180917222334.27753-1-philippe.waroquiers@skynet.be> X-IsSubscribed: yes |
Commit Message
Philippe Waroquiers
Sept. 17, 2018, 10:23 p.m. UTC
Without the patch: (gdb) apropos able frame-filter disable frame-filter -- GDB command to disable the specified frame-filter enable frame-filter -- GDB command to disable the specified frame-filter With the patch: (gdb) apropos able frame-filter disable frame-filter -- GDB command to disable the specified frame-filter enable frame-filter -- GDB command to enable the specified frame-filter Pushed as obvious --- gdb/python/lib/gdb/command/frame_filters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Note that the Usage: string in the below still looks strange to me: the second 'enable' in Usage: enable frame-filter enable DICTIONARY [NAME] should be removed (and similarly in the disable frame-filter). Then, reading the 'help enable frame-filter', it looks like DICTIONARY is optional, but the Usage: seems to indicate it is mandatory. I am wondering if the correct Usage: would be something like: Usage: enable frame-filter enable [DICTIONARY [NAME]] (and similar for disable frame-filter). The texinfo documentation seems also somewhat different from the 'help enable frame-filter' e.g. it tells that DICTIONARY may be the name of an object file, while the help does not tell that (at least not that clearly). So, would be good if someone mastering frame filter would clarify the doc/help. Philippe On Tue, 2018-09-18 at 00:23 +0200, Philippe Waroquiers wrote: > Without the patch: > (gdb) apropos able frame-filter > disable frame-filter -- GDB command to disable the specified frame-filter > enable frame-filter -- GDB command to disable the specified frame-filter > > With the patch: > (gdb) apropos able frame-filter > disable frame-filter -- GDB command to disable the specified frame-filter > enable frame-filter -- GDB command to enable the specified frame-filter > > Pushed as obvious > --- > gdb/python/lib/gdb/command/frame_filters.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/python/lib/gdb/command/frame_filters.py b/gdb/python/lib/gdb/command/frame_filters.py > index 3afe5e9ac1..16a40ed98e 100644 > --- a/gdb/python/lib/gdb/command/frame_filters.py > +++ b/gdb/python/lib/gdb/command/frame_filters.py > @@ -207,7 +207,7 @@ def _complete_frame_filter_name(word, printer_dict): > return flist > > class EnableFrameFilter(gdb.Command): > - """GDB command to disable the specified frame-filter. > + """GDB command to enable the specified frame-filter. > > Usage: enable frame-filter enable DICTIONARY [NAME] >
>>>>> "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:
Philippe> Note that the Usage: string in the below still looks strange to me:
Philippe> the second 'enable' in
Philippe> Usage: enable frame-filter enable DICTIONARY [NAME]
Philippe> should be removed (and similarly in the disable frame-filter).
Yes, I agree.
Philippe> Then, reading the 'help enable frame-filter', it looks like DICTIONARY is
Philippe> optional, but the Usage: seems to indicate it is mandatory.
Looking at the code it seems like the syntax is:
enable frame-filter [all | DICTIONARY NAME]
Though there is a bug if you don't pass arguments at all:
(gdb) enable frame-filter
Traceback (most recent call last):
File "/usr/share/gdb/python/gdb/command/frame_filters.py", line 238, in invoke
command_tuple = _enable_parse_arg("enable frame-filter", arg)
File "/usr/share/gdb/python/gdb/command/frame_filters.py", line 115, in _enable_parse_arg
if argv[0] == "all" and argc > 1:
IndexError: list index out of range
Error occurred in Python command: list index out of range
Tom
diff --git a/gdb/python/lib/gdb/command/frame_filters.py b/gdb/python/lib/gdb/command/frame_filters.py index 3afe5e9ac1..16a40ed98e 100644 --- a/gdb/python/lib/gdb/command/frame_filters.py +++ b/gdb/python/lib/gdb/command/frame_filters.py @@ -207,7 +207,7 @@ def _complete_frame_filter_name(word, printer_dict): return flist class EnableFrameFilter(gdb.Command): - """GDB command to disable the specified frame-filter. + """GDB command to enable the specified frame-filter. Usage: enable frame-filter enable DICTIONARY [NAME]