|
GDB (xrefs)
|
#include "completer.h"
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 | 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 (size_t 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 (gdb::unique_xmalloc_ptr< char > &&new_match) |
Private Attributes | |
| completion_match_result | m_completion_match_result |
| completion_list | m_entries_vec |
| htab_t | 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 |
Definition at line 310 of file completer.h.
| completion_tracker::completion_tracker | ( | ) |
Definition at line 1475 of file completer.c.
References INITIAL_COMPLETION_HTAB_SIZE, m_entries_hash, streq(), xcalloc(), and xfree().
| completion_tracker::~completion_tracker | ( | ) |
Definition at line 1502 of file completer.c.
References m_entries_hash, 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 1550 of file completer.c.
References _, MAX_COMPLETIONS_REACHED_ERROR, maybe_add_completion(), name, and throw_error().
Referenced by add_completions(), cmdpy_completer(), cmdscm_add_completion(), complete_explicit_location(), complete_internalvar(), complete_label(), complete_on_cmdlist(), complete_on_enum(), completion_list_add_name(), condition_completer(), filename_completer(), interpreter_completer(), linespec_complete(), reg_or_group_completer_1(), signal_completer(), sim_command_completer(), and tui_reggroup_completer().
| void completion_tracker::add_completions | ( | completion_list && | list | ) |
Definition at line 1561 of file completer.c.
References add_completion().
Referenced by collect_explicit_location_matches(), complete_expression(), complete_files_symbols(), and complete_linespec_component().
| void completion_tracker::advance_custom_word_point_by | ( | size_t | len | ) |
Definition at line 1946 of file completer.c.
References m_custom_word_point.
Referenced by advance_to_expression_complete_word_point(), collect_explicit_location_matches(), complete_address_and_linespec_locations(), complete_explicit_location(), complete_line_internal_1(), linespec_complete(), location_completer(), and skip_keyword().
| completion_result completion_tracker::build_completion_result | ( | const char * | text, |
| int | start, | ||
| int | end | ||
| ) |
Definition at line 2019 of file completer.c.
References expand_preserving_ws(), m_entries_vec, m_lowest_common_denominator, m_lowest_common_denominator_unique, quote_char(), suppress_append_ws(), and XNEWVEC.
Referenced by complete_command(), and gdb_rl_attempted_completion_function_throw().
| bool completion_tracker::completes_to_completion_word | ( | const char * | word | ) |
Definition at line 379 of file completer.c.
References m_lowest_common_denominator, m_lowest_common_denominator_unique, and strncmp_iw().
Referenced by collect_explicit_location_matches(), and linespec_complete().
|
inline |
Definition at line 352 of file completer.h.
References m_custom_word_point.
Referenced by 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 1485 of file completer.c.
References INITIAL_COMPLETION_HTAB_SIZE, m_entries_hash, m_entries_vec, m_lowest_common_denominator, m_lowest_common_denominator_unique, streq(), xcalloc(), and xfree().
Referenced by collect_explicit_location_matches(), and linespec_complete().
|
inline |
Definition at line 391 of file completer.h.
References m_entries_vec.
Referenced by collect_explicit_location_matches(), complete_files_symbols(), complete_linespec_component(), linespec_complete(), linespec_parse_basic(), and location_completer().
|
private |
Definition at line 1512 of file completer.c.
References completion_match_for_lcd::finish(), make_completion_match_str(), max_completions, and name.
Referenced by add_completion().
|
inline |
Definition at line 338 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 1913 of file completer.c.
|
inline |
Definition at line 380 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 356 of file completer.h.
References m_custom_word_point.
Referenced by location_completer().
|
inline |
Definition at line 332 of file completer.h.
References m_quote_char, and quote_char().
Referenced by complete_linespec_component(), linespec_complete(), and location_completer().
|
inline |
Definition at line 369 of file completer.h.
References m_suppress_append_ws, and suppress.
Referenced by complete_linespec_component().
|
inline |
Definition at line 344 of file completer.h.
References enable, and m_use_custom_word_point.
Referenced by location_completer_handle_brkchars().
|
inline |
Definition at line 364 of file completer.h.
References m_suppress_append_ws.
Referenced by build_completion_result().
|
inline |
Definition at line 348 of file completer.h.
References m_use_custom_word_point.
Referenced by complete_command(), completion_find_completion_word(), gdb_completion_word_break_characters_throw(), and gdb_rl_attempted_completion_function_throw().
|
private |
Definition at line 431 of file completer.h.
Referenced by reset_completion_match_result().
|
private |
Definition at line 464 of file completer.h.
Referenced by advance_custom_word_point_by(), custom_word_point(), and set_custom_word_point().
|
private |
Definition at line 442 of file completer.h.
Referenced by completion_tracker(), discard_completions(), and ~completion_tracker().
|
private |
Definition at line 434 of file completer.h.
Referenced by build_completion_result(), discard_completions(), and have_completions().
|
private |
Definition at line 476 of file completer.h.
Referenced by build_completion_result(), completes_to_completion_word(), discard_completions(), and ~completion_tracker().
|
private |
Definition at line 485 of file completer.h.
Referenced by build_completion_result(), completes_to_completion_word(), and discard_completions().
|
private |
Definition at line 453 of file completer.h.
Referenced by quote_char(), and set_quote_char().
|
private |
Definition at line 472 of file completer.h.
Referenced by set_suppress_append_ws(), and suppress_append_ws().
|
private |
Definition at line 458 of file completer.h.
Referenced by set_use_custom_word_point(), and use_custom_word_point().
1.8.14