GDB (xrefs)
|
#include "completer.h"
Classes | |
class | completion_hash_entry |
Public Member Functions | |
completion_tracker () | |
~completion_tracker () | |
DISABLE_COPY_AND_ASSIGN (completion_tracker) | |
void | add_completion (gdb::unique_xmalloc_ptr< char > name, completion_match_for_lcd *match_for_lcd=NULL, const char *text=NULL, const char *word=NULL) |
void | add_completions (completion_list &&list) |
void | remove_completion (const char *name) |
void | set_quote_char (int quote_char) |
int | quote_char () |
void | set_use_custom_word_point (bool enable) |
bool | use_custom_word_point () const |
int | custom_word_point () const |
void | set_custom_word_point (int point) |
void | advance_custom_word_point_by (int len) |
bool | suppress_append_ws () const |
void | set_suppress_append_ws (bool suppress) |
bool | completes_to_completion_word (const char *word) |
completion_match_result & | reset_completion_match_result () |
bool | have_completions () const |
void | discard_completions () |
completion_result | build_completion_result (const char *text, int start, int end) |
Private Member Functions | |
bool | maybe_add_completion (gdb::unique_xmalloc_ptr< char > name, completion_match_for_lcd *match_for_lcd, const char *text, const char *word) |
void | recompute_lowest_common_denominator () |
void | recompute_lcd_visitor (completion_hash_entry *entry) |
Private Attributes | |
completion_match_result | m_completion_match_result |
htab_up | m_entries_hash |
int | m_quote_char = '\0' |
bool | m_use_custom_word_point = false |
int | m_custom_word_point = 0 |
bool | m_suppress_append_ws = false |
char * | m_lowest_common_denominator = NULL |
bool | m_lowest_common_denominator_unique = false |
bool | m_lowest_common_denominator_valid = false |
size_t | m_lowest_common_denominator_max_length = 0 |
Definition at line 328 of file completer.h.
completion_tracker::completion_tracker | ( | ) |
Definition at line 1475 of file completer.c.
References discard_completions().
completion_tracker::~completion_tracker | ( | ) |
Definition at line 1528 of file completer.c.
References m_lowest_common_denominator, and xfree().
void completion_tracker::add_completion | ( | gdb::unique_xmalloc_ptr< char > | name, |
completion_match_for_lcd * | match_for_lcd = NULL, | ||
const char * | text = NULL, | ||
const char * | word = NULL ) |
Definition at line 1579 of file completer.c.
References maybe_add_completion(), and name.
Referenced by add_completions(), catch_ada_completer(), cmdpy_completer(), cmdscm_add_completion(), complete_explicit_location_spec(), complete_internalvar(), complete_label(), complete_on_cmdlist(), complete_on_enum(), gdb::option::complete_on_options(), gdb::option::complete_options(), complete_skip_number(), completion_list_add_name(), condition_completer(), filename_completer(), info_threads_command_completer(), integer_literals_completer(), interpreter_completer(), linespec_complete(), maintenance_selftest_completer(), reg_or_group_completer_1(), show_user_completer(), signal_completer(), sim_command_completer(), and skip_over_slash_fmt().
void completion_tracker::add_completions | ( | completion_list && | list | ) |
Definition at line 1590 of file completer.c.
References add_completion().
Referenced by collect_explicit_location_matches(), ada_tick_completer::complete(), expr::structop_base_operation::complete(), complete_files_symbols(), and complete_linespec_component().
void completion_tracker::advance_custom_word_point_by | ( | int | len | ) |
Definition at line 2049 of file completer.c.
References m_custom_word_point.
Referenced by advance_to_completion_word(), alias_command_completer(), backtrace_command_completer(), collect_explicit_location_matches(), complete_address_and_linespec_locations(), complete_explicit_location_spec(), complete_line_internal_1(), gdb::option::complete_options(), condition_completer(), frame_apply_cmd_completer(), frame_apply_level_cmd_completer(), linespec_complete(), location_completer(), skip_keyword(), skip_over_slash_fmt(), thread_apply_command_completer(), and with_command_completer_1().
completion_result completion_tracker::build_completion_result | ( | const char * | text, |
int | start, | ||
int | end ) |
Definition at line 2122 of file completer.c.
References expand_preserving_ws(), func, m_entries_hash, m_lowest_common_denominator, m_lowest_common_denominator_unique, quote_char(), recompute_lowest_common_denominator(), and suppress_append_ws().
Referenced by complete(), and gdb_rl_attempted_completion_function_throw().
bool completion_tracker::completes_to_completion_word | ( | const char * | word | ) |
Definition at line 442 of file completer.c.
References m_lowest_common_denominator, m_lowest_common_denominator_unique, recompute_lowest_common_denominator(), and strncmp_iw().
Referenced by collect_explicit_location_matches(), and linespec_complete().
|
inline |
Definition at line 374 of file completer.h.
References m_custom_word_point.
Referenced by complete_nested_command_line(), completion_find_completion_word(), gdb_completion_word_break_characters_throw(), and location_completer().
completion_tracker::DISABLE_COPY_AND_ASSIGN | ( | completion_tracker | ) |
void completion_tracker::discard_completions | ( | ) |
Definition at line 1483 of file completer.c.
References INITIAL_COMPLETION_HTAB_SIZE, m_entries_hash, m_lowest_common_denominator, m_lowest_common_denominator_unique, m_lowest_common_denominator_valid, xcalloc(), and xfree().
Referenced by collect_explicit_location_matches(), completion_tracker(), and linespec_complete().
|
inline |
Definition at line 413 of file completer.h.
References m_entries_hash.
Referenced by backtrace_command_completer(), collect_explicit_location_matches(), complete_files_symbols(), complete_linespec_component(), gdb::option::complete_options(), linespec_complete(), linespec_parse_basic(), and location_completer().
|
private |
Definition at line 1536 of file completer.c.
References completion_match_for_lcd::finish(), m_entries_hash, m_lowest_common_denominator_max_length, m_lowest_common_denominator_valid, make_completion_match_str(), max_completions, and name.
Referenced by add_completion().
|
inline |
Definition at line 360 of file completer.h.
References m_quote_char.
Referenced by build_completion_result(), complete_linespec_component(), completion_find_completion_word(), linespec_complete(), and set_quote_char().
|
private |
Definition at line 1986 of file completer.c.
References m_lowest_common_denominator, m_lowest_common_denominator_unique, and m_lowest_common_denominator_valid.
Referenced by recompute_lowest_common_denominator().
|
private |
Definition at line 2020 of file completer.c.
References m_entries_hash, m_lowest_common_denominator, m_lowest_common_denominator_max_length, m_lowest_common_denominator_valid, recompute_lcd_visitor(), and xrealloc().
Referenced by build_completion_result(), and completes_to_completion_word().
void completion_tracker::remove_completion | ( | const char * | name | ) |
Definition at line 1599 of file completer.c.
References m_entries_hash, m_lowest_common_denominator_valid, and name.
Referenced by completion_list_add_symbol().
|
inline |
Definition at line 402 of file completer.h.
References completion_match::clear(), completion_match_for_lcd::clear(), m_completion_match_result, completion_match_result::match, and completion_match_result::match_for_lcd.
Referenced by completion_list_add_name().
|
inline |
Definition at line 378 of file completer.h.
References m_custom_word_point.
Referenced by complete_nested_command_line(), and location_completer().
|
inline |
Definition at line 354 of file completer.h.
References m_quote_char, and quote_char().
Referenced by advance_to_completion_word(), complete_linespec_component(), linespec_complete(), and location_completer().
|
inline |
Definition at line 391 of file completer.h.
References m_suppress_append_ws, and suppress.
Referenced by advance_to_completion_word(), and complete_linespec_component().
|
inline |
Definition at line 366 of file completer.h.
References enable, and m_use_custom_word_point.
Referenced by alias_command_completer(), complete_nested_command_line(), gdb::option::complete_options(), frame_apply_level_cmd_completer(), location_completer_handle_brkchars(), skip_over_slash_fmt(), thread_apply_command_completer(), and with_command_completer_1().
|
inline |
Definition at line 386 of file completer.h.
References m_suppress_append_ws.
Referenced by build_completion_result().
|
inline |
Definition at line 370 of file completer.h.
References m_use_custom_word_point.
Referenced by complete(), complete_nested_command_line(), completion_find_completion_word(), gdb_completion_word_break_characters_throw(), and gdb_rl_attempted_completion_function_throw().
|
private |
Definition at line 453 of file completer.h.
Referenced by reset_completion_match_result().
|
private |
Definition at line 483 of file completer.h.
Referenced by advance_custom_word_point_by(), custom_word_point(), and set_custom_word_point().
|
private |
Definition at line 461 of file completer.h.
Referenced by build_completion_result(), discard_completions(), have_completions(), maybe_add_completion(), recompute_lowest_common_denominator(), and remove_completion().
|
private |
Definition at line 495 of file completer.h.
Referenced by build_completion_result(), completes_to_completion_word(), discard_completions(), recompute_lcd_visitor(), recompute_lowest_common_denominator(), and ~completion_tracker().
|
private |
Definition at line 514 of file completer.h.
Referenced by maybe_add_completion(), and recompute_lowest_common_denominator().
|
private |
Definition at line 504 of file completer.h.
Referenced by build_completion_result(), completes_to_completion_word(), discard_completions(), and recompute_lcd_visitor().
|
private |
Definition at line 509 of file completer.h.
Referenced by discard_completions(), maybe_add_completion(), recompute_lcd_visitor(), recompute_lowest_common_denominator(), and remove_completion().
|
private |
Definition at line 472 of file completer.h.
Referenced by quote_char(), and set_quote_char().
|
private |
Definition at line 491 of file completer.h.
Referenced by set_suppress_append_ws(), and suppress_append_ws().
|
private |
Definition at line 477 of file completer.h.
Referenced by set_use_custom_word_point(), and use_custom_word_point().