but it does affect how much stuff M-? lists.
(2) If one of the matches contains a word break character, readline
will quote it. That's why we switch between
- current_language->la_word_break_characters() and
+ current_language->word_break_characters () and
gdb_completer_command_word_break_characters. I'm not sure when
we need this behavior (perhaps for funky characters in C++
symbols?). */
advance_to_expression_complete_word_point (completion_tracker &tracker,
const char *text)
{
- const char *brk_chars = current_language->la_word_break_characters ();
+ const char *brk_chars = current_language->word_break_characters ();
return advance_to_completion_word (tracker, brk_chars, text);
}
colon = p;
symbol_start = p + 1;
}
- else if (strchr (current_language->la_word_break_characters(), *p))
+ else if (strchr (current_language->word_break_characters (), *p))
symbol_start = p + 1;
}
const char *type_name = NULL;
type = check_typedef (type);
- for (i = 0; i < TYPE_NFIELDS (type); ++i)
+ for (i = 0; i < type->num_fields (); ++i)
{
if (i < TYPE_N_BASECLASSES (type))
add_struct_fields (TYPE_BASECLASS (type, i),
fieldname, namelen))
output.emplace_back (xstrdup (TYPE_FIELD_NAME (type, i)));
}
- else if (TYPE_CODE (TYPE_FIELD_TYPE (type, i)) == TYPE_CODE_UNION)
+ else if (type->field (i).type ()->code () == TYPE_CODE_UNION)
{
/* Recurse into anonymous unions. */
- add_struct_fields (TYPE_FIELD_TYPE (type, i),
+ add_struct_fields (type->field (i).type (),
output, fieldname, namelen);
}
}
{
if (!computed_type_name)
{
- type_name = TYPE_NAME (type);
+ type_name = type->name ();
computed_type_name = 1;
}
/* Omit constructors from the completion list. */
for (;;)
{
type = check_typedef (type);
- if (TYPE_CODE (type) != TYPE_CODE_PTR && !TYPE_IS_REFERENCE (type))
+ if (type->code () != TYPE_CODE_PTR && !TYPE_IS_REFERENCE (type))
break;
type = TYPE_TARGET_TYPE (type);
}
- if (TYPE_CODE (type) == TYPE_CODE_UNION
- || TYPE_CODE (type) == TYPE_CODE_STRUCT)
+ if (type->code () == TYPE_CODE_UNION
+ || type->code () == TYPE_CODE_STRUCT)
{
completion_list result;
strings, which leaves out the '-' and '.' character used in some
commands. */
set_rl_completer_word_break_characters
- (current_language->la_word_break_characters());
+ (current_language->word_break_characters ());
/* Decide whether to complete on a list of gdb commands or on
symbols. */
const char *text, const char *word)
{
set_rl_completer_word_break_characters
- (current_language->la_word_break_characters ());
+ (current_language->word_break_characters ());
}
/* See definition in completer.h. */
/* See completer.h */
-completion_result::completion_result (completion_result &&rhs)
+completion_result::completion_result (completion_result &&rhs) noexcept
+ : match_list (rhs.match_list),
+ number_matches (rhs.number_matches)
{
- if (this == &rhs)
- return;
-
- reset_match_list ();
- match_list = rhs.match_list;
rhs.match_list = NULL;
- number_matches = rhs.number_matches;
rhs.number_matches = 0;
}
quotechars = gdb_completer_quote_characters;
if (breakchars == NULL)
- breakchars = current_language->la_word_break_characters();
+ breakchars = current_language->word_break_characters ();
for (scan = str; *scan != '\0'; scan++)
{