void
default_collect_symbol_completion_matches_break_on
(completion_tracker &tracker,
+ complete_symbol_mode mode,
const char *text, const char *word,
const char *break_on, enum type_code code)
{
int sym_text_len;
/* Now look for the symbol we are supposed to complete on. */
+ if (mode == complete_symbol_mode::LINESPEC)
+ sym_text = text;
+ else
{
const char *p;
char quote_found;
void
default_collect_symbol_completion_matches (completion_tracker &tracker,
+ complete_symbol_mode mode,
const char *text, const char *word,
enum type_code code)
{
- return default_collect_symbol_completion_matches_break_on (tracker,
+ return default_collect_symbol_completion_matches_break_on (tracker, mode,
text, word, "",
code);
}
void
collect_symbol_completion_matches (completion_tracker &tracker,
+ complete_symbol_mode mode,
const char *text, const char *word)
{
- current_language->la_collect_symbol_completion_matches (tracker,
+ current_language->la_collect_symbol_completion_matches (tracker, mode,
text, word,
TYPE_CODE_UNDEF);
}
const char *text, const char *word,
enum type_code code)
{
+ complete_symbol_mode mode = complete_symbol_mode::EXPRESSION;
+
gdb_assert (code == TYPE_CODE_UNION
|| code == TYPE_CODE_STRUCT
|| code == TYPE_CODE_ENUM);
- current_language->la_collect_symbol_completion_matches (tracker,
+ current_language->la_collect_symbol_completion_matches (tracker, mode,
text, word, code);
}
void
collect_file_symbol_completion_matches (completion_tracker &tracker,
+ complete_symbol_mode mode,
const char *text, const char *word,
const char *srcfile)
{
/* Now look for the symbol we are supposed to complete on.
FIXME: This should be language-specific. */
+ if (mode == complete_symbol_mode::LINESPEC)
+ sym_text = text;
+ else
{
const char *p;
char quote_found;