Explicit locations -label completer
authorPedro Alves <palves@redhat.com>
Mon, 17 Jul 2017 19:24:41 +0000 (20:24 +0100)
committerPedro Alves <palves@redhat.com>
Mon, 17 Jul 2017 19:24:41 +0000 (20:24 +0100)
commita245927022bc4351fafd9e6275e217021ec93e08
tree0446dc2f9ce7476bc3ef3d8649c419b86b20378e
parentc6756f62e04846d68c24ee922ddb0377d4bd17f2
Explicit locations -label completer

We're missing a completer for

  (gdb) break -function func -label [TAB]

This patch adds one.  Tests will be added later in the series.

gdb/ChangeLog:
2017-07-17  Pedro Alves  <palves@redhat.com>

* completer.c (collect_explicit_location_matches): Handle
MATCH_LABEL.
(convert_explicit_location_to_linespec): New, factored out from
...
(convert_explicit_location_to_sals): ... this.
(complete_label): New.
(linespec_complete_label, find_label_symbols_in_block): New.
(find_label_symbols): Add completion_mode parameter and adjust to
call find_label_symbols_in_block.
* linespec.h (linespec_complete_label): Declare.
gdb/ChangeLog
gdb/completer.c
gdb/linespec.c
gdb/linespec.h