* [PATCH] [OBVIOUS] enable frame-filter short help uses disable instead of enable
@ 2018-09-17 22:23 Philippe Waroquiers
2018-09-17 22:42 ` Philippe Waroquiers
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Waroquiers @ 2018-09-17 22:23 UTC (permalink / raw)
To: gdb-patches; +Cc: Philippe Waroquiers
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]
--
2.18.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [OBVIOUS] enable frame-filter short help uses disable instead of enable
2018-09-17 22:23 [PATCH] [OBVIOUS] enable frame-filter short help uses disable instead of enable Philippe Waroquiers
@ 2018-09-17 22:42 ` Philippe Waroquiers
2018-09-18 4:35 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Waroquiers @ 2018-09-17 22:42 UTC (permalink / raw)
To: gdb-patches
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]
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [OBVIOUS] enable frame-filter short help uses disable instead of enable
2018-09-17 22:42 ` Philippe Waroquiers
@ 2018-09-18 4:35 ` Tom Tromey
0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2018-09-18 4:35 UTC (permalink / raw)
To: Philippe Waroquiers; +Cc: gdb-patches
>>>>> "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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-18 4:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-17 22:23 [PATCH] [OBVIOUS] enable frame-filter short help uses disable instead of enable Philippe Waroquiers
2018-09-17 22:42 ` Philippe Waroquiers
2018-09-18 4:35 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox