diff options
author | Pedro Alves <palves@redhat.com> | 2017-07-17 20:24:41 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-07-17 20:24:41 +0100 |
commit | a245927022bc4351fafd9e6275e217021ec93e08 (patch) | |
tree | 0446dc2f9ce7476bc3ef3d8649c419b86b20378e /gdb/linespec.h | |
parent | c6756f62e04846d68c24ee922ddb0377d4bd17f2 (diff) | |
download | gdb-a245927022bc4351fafd9e6275e217021ec93e08.zip gdb-a245927022bc4351fafd9e6275e217021ec93e08.tar.gz gdb-a245927022bc4351fafd9e6275e217021ec93e08.tar.bz2 |
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.
Diffstat (limited to 'gdb/linespec.h')
-rw-r--r-- | gdb/linespec.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/linespec.h b/gdb/linespec.h index d55ba12..f16bb81 100644 --- a/gdb/linespec.h +++ b/gdb/linespec.h @@ -194,6 +194,17 @@ extern void linespec_complete_function (completion_tracker &tracker, const char *function, const char *source_filename); +/* Complete a label symbol, in linespec mode. Only labels of + functions named FUNCTION_NAME are considered. If SOURCE_FILENAME + is non-NULL, limits completion to labels of functions defined in + source files that match SOURCE_FILENAME. */ + +extern void linespec_complete_label (completion_tracker &tracker, + const struct language_defn *language, + const char *source_filename, + const char *function_name, + const char *label_name); + /* Evaluate the expression pointed to by EXP_PTR into a CORE_ADDR, advancing EXP_PTR past any parsed text. */ |