Make TUI borders respect "set style enabled"
[deliverable/binutils-gdb.git] / gdb / completer.h
index 282e954a4e8540bfd3971d90ddac2326a9ca2d23..703a5768d11cf3c601216434051f6d87c3ad968b 100644 (file)
@@ -1,5 +1,5 @@
 /* Header for GDB line completion.
-   Copyright (C) 2000-2019 Free Software Foundation, Inc.
+   Copyright (C) 2000-2020 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,8 +17,8 @@
 #if !defined (COMPLETER_H)
 #define COMPLETER_H 1
 
+#include "gdbsupport/gdb_vecs.h"
 #include "command.h"
-#include "common/gdb_vecs.h"
 
 /* Types of functions in struct match_list_displayer.  */
 
@@ -357,7 +357,7 @@ public:
   { m_custom_word_point = point; }
 
   /* Advance the custom word point by LEN.  */
-  void advance_custom_word_point_by (size_t len);
+  void advance_custom_word_point_by (int len);
 
   /* Whether to tell readline to skip appending a whitespace after the
      completion.  See m_suppress_append_ws.  */
@@ -510,6 +510,13 @@ extern void complete_line (completion_tracker &tracker,
                           const char *line_buffer,
                           int point);
 
+/* Complete LINE and return completion results.  For completion purposes,
+   cursor position is assumed to be at the end of LINE.  WORD is set to
+   the end of word to complete.  QUOTE_CHAR is set to the opening quote
+   character if we found an unclosed quoted substring, '\0' otherwise.  */
+extern completion_result
+  complete (const char *line, char const **word, int *quote_char);
+
 /* Find the bounds of the word in TEXT for completion purposes, and
    return a pointer to the end of the word.  Calls the completion
    machinery for a handle_brkchars phase (using TRACKER) to figure out
@@ -525,10 +532,15 @@ extern const char *completion_find_completion_word (completion_tracker &tracker,
    completion word point for TEXT, emulating the algorithm readline
    uses to find the word point, using the current language's word
    break characters.  */
-
 const char *advance_to_expression_complete_word_point
   (completion_tracker &tracker, const char *text);
 
+/* Assuming TEXT is an filename, find the completion word point for
+   TEXT, emulating the algorithm readline uses to find the word
+   point.  */
+extern const char *advance_to_filename_complete_word_point
+  (completion_tracker &tracker, const char *text);
+
 extern char **gdb_rl_attempted_completion_function (const char *text,
                                                    int start, int end);
 
@@ -599,6 +611,18 @@ extern completion_list complete_source_filenames (const char *text);
 extern void complete_expression (completion_tracker &tracker,
                                 const char *text, const char *word);
 
+/* Called by custom word point completers that want to recurse into
+   the completion machinery to complete a command.  Used to complete
+   COMMAND in "thread apply all COMMAND", for example.  Note that
+   unlike command_completer, this fully recurses into the proper
+   completer for COMMAND, so that e.g.,
+
+     (gdb) thread apply all print -[TAB]
+
+   does the right thing and show the print options.  */
+extern void complete_nested_command_line (completion_tracker &tracker,
+                                         const char *text);
+
 extern const char *skip_quoted_chars (const char *, const char *,
                                      const char *);
 
This page took 0.024029 seconds and 4 git commands to generate.