This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] Add completer for skip numbers


On 2018-11-12 07:41, Pedro Alves wrote:
On 11/11/2018 04:54 PM, Simon Marchi wrote:
Add completer to various commands that accept skip numbers:

  - skip enable
  - skip disable
  - skip delete
  - info skip

These commands also accept ranges, the completer works for that but is
not very smart. It will suggest invalid ranges, for example when doing "2-<TAB>" it will suggest "1", which would not result in a valid range.
Also, it will keep suggesting when doing "1-2-<TAB>", even though it's
an invalid syntax.

A future idea would be to make a re-usable and well-tested completer for numbers and ranges. I think it could at least be re-used for breakpoint and thread numbers (for example with the "enable breakpoints" command).

gdb/ChangeLog:

	* skip.c (complete_skip_number): New function.
	(_initialize_step_skip): Add completers to some skip commands.

gdb/testsuite/ChangeLog:

	* gdb.base/skip.exp: Add standard_testfile.  Add "skip delete"
	completer tests.

OK.

Thanks,
Pedro Alves

Thanks, pushed.

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]