aboutsummaryrefslogtreecommitdiff
path: root/gdb/completer.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/completer.h')
-rw-r--r--gdb/completer.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/gdb/completer.h b/gdb/completer.h
index 40d2f58..f68c6dc 100644
--- a/gdb/completer.h
+++ b/gdb/completer.h
@@ -192,6 +192,16 @@ public:
/* Advance the custom word point by LEN. */
void advance_custom_word_point_by (size_t len);
+ /* Whether to tell readline to skip appending a whitespace after the
+ completion. See m_suppress_append_ws. */
+ bool suppress_append_ws () const
+ { return m_suppress_append_ws; }
+
+ /* Set whether to tell readline to skip appending a whitespace after
+ the completion. See m_suppress_append_ws. */
+ void set_suppress_append_ws (bool suppress)
+ { m_suppress_append_ws = suppress; }
+
/* Return true if we only have one completion, and it matches
exactly the completion word. I.e., completing results in what we
already have. */
@@ -255,6 +265,14 @@ private:
completable words. */
int m_custom_word_point = 0;
+ /* If true, tell readline to skip appending a whitespace after the
+ completion. Automatically set if we have a unique completion
+ that already has a space at the end. A completer may also
+ explicitly set this. E.g., the linespec completer sets this when
+ the completion ends with the ":" separator between filename and
+ function name. */
+ bool m_suppress_append_ws = false;
+
/* Our idea of lowest common denominator to hand over to readline.
See intro. */
char *m_lowest_common_denominator = NULL;
@@ -353,6 +371,16 @@ extern completer_handle_brkchars_ftype *
/* Exported to linespec.c */
+/* Return a list of all source files whose names begin with matching
+ TEXT. */
+extern completion_list complete_source_filenames (const char *text);
+
+/* Complete on expressions. Often this means completing on symbol
+ names, but some language parsers also have support for completing
+ field names. */
+extern void complete_expression (completion_tracker &tracker,
+ const char *text, const char *word);
+
extern const char *skip_quoted_chars (const char *, const char *,
const char *);