GDB (xrefs)

Classes | Typedefs | Functions | Variables
/tmp/gdb-8.1/gdb/completer.h File Reference
`#include "gdb_vecs.h"`
`#include "command.h"`

Go to the source code of this file.

## Classes
struct | match_list_displayer
class | completion_match
class | completion_match_for_lcd
struct | completion_match_result
struct | completion_result
class | completion_tracker

## Typedefs
typedef void | mld_crlf_ftype(const struct match_list_displayer *)
typedef void | mld_putch_ftype(const struct match_list_displayer *, int)
typedef void | mld_puts_ftype(const struct match_list_displayer *, const char *)
typedef void | mld_flush_ftype(const struct match_list_displayer *)
typedef void | mld_erase_entire_line_ftype(const struct match_list_displayer *)
typedef void | mld_beep_ftype(const struct match_list_displayer *)
typedef int | mld_read_key_ftype(const struct match_list_displayer *)
typedef std::vector< gdb::unique_xmalloc_ptr< char > > | completion_list

## Functions
gdb::unique_xmalloc_ptr< char > | make_completion_match_str (const char *match_name, const char *text, const char *word)
gdb::unique_xmalloc_ptr< char > | make_completion_match_str (gdb::unique_xmalloc_ptr< char > &&match_name, const char *text, const char *word)
void | gdb_display_match_list (char **matches, int len, int max, const struct match_list_displayer *)
const char * | get_max_completions_reached_message (void)
void | complete_line (completion_tracker &tracker, const char *text, const char *line_buffer, int point)
const char * | completion_find_completion_word (completion_tracker &tracker, const char *text, int *quote_char)
const char * | advance_to_expression_complete_word_point (completion_tracker &tracker, const char *text)
char ** | gdb_rl_attempted_completion_function (const char *text, int start, int end)
void | noop_completer (struct cmd_list_element *, completion_tracker &tracker, const char *, const char *)
void | filename_completer (struct cmd_list_element *, completion_tracker &tracker, const char *, const char *)
void | expression_completer (struct cmd_list_element *, completion_tracker &tracker, const char *, const char *)
void | location_completer (struct cmd_list_element *, completion_tracker &tracker, const char *, const char *)
void | symbol_completer (struct cmd_list_element *, completion_tracker &tracker, const char *, const char *)
void | command_completer (struct cmd_list_element *, completion_tracker &tracker, const char *, const char *)
void | signal_completer (struct cmd_list_element *, completion_tracker &tracker, const char *, const char *)
void | reg_or_group_completer (struct cmd_list_element *, completion_tracker &tracker, const char *, const char *)
void | reggroup_completer (struct cmd_list_element *, completion_tracker &tracker, const char *, const char *)
const char * | get_gdb_completer_quote_characters (void)
char * | gdb_completion_word_break_characters (void)
void | set_rl_completer_word_break_characters (const char *break_chars)
completer_handle_brkchars_ftype * | completer_handle_brkchars_func_for_completer (completer_ftype *fn)
completion_list | complete_source_filenames (const char *text)
void | complete_expression (completion_tracker &tracker, const char *text, const char *word)
const char * | skip_quoted_chars (const char *, const char *, const char *)
const char * | skip_quoted (const char *)

## Variables
int | max_completions

## Typedef Documentation

## ◆ completion_list

typedef std::vector<gdb::unique_xmalloc_ptr<char> > completion_list

Definition at line 69 of file completer.h.

## ◆ mld_beep_ftype

typedef void mld_beep_ftype(const struct match_list_displayer *)

Definition at line 33 of file completer.h.

## ◆ mld_crlf_ftype

typedef void mld_crlf_ftype(const struct match_list_displayer *)

Definition at line 27 of file completer.h.

## ◆ mld_erase_entire_line_ftype

typedef void mld_erase_entire_line_ftype(const struct match_list_displayer *)

Definition at line 32 of file completer.h.

## ◆ mld_flush_ftype

typedef void mld_flush_ftype(const struct match_list_displayer *)

Definition at line 31 of file completer.h.

## ◆ mld_putch_ftype

typedef void mld_putch_ftype(const struct match_list_displayer *, int)

Definition at line 28 of file completer.h.

## ◆ mld_puts_ftype

typedef void mld_puts_ftype(const struct match_list_displayer *, const char *)

Definition at line 29 of file completer.h.

## ◆ mld_read_key_ftype

typedef int mld_read_key_ftype(const struct match_list_displayer *)

Definition at line 34 of file completer.h.

## Function Documentation

## ◆ advance_to_expression_complete_word_point()

const char* advance_to_expression_complete_word_point | ( | completion_tracker & | tracker,
|  | const char * | text
| ) |  |

Definition at line 358 of file completer.c.

References completion_tracker::advance_custom_word_point_by(), gdb_rl_completion_word_info::basic_quote_characters, current_language, gdb_completer_quote_characters, gdb_rl_find_completion_word(), language_defn::la_word_break_characters, gdb_rl_completion_word_info::quote_characters, and gdb_rl_completion_word_info::word_break_characters.

Referenced by complete_address_and_linespec_locations(), complete_linespec_component(), and location_completer().

## ◆ command_completer()

void command_completer | ( | struct cmd_list_element * | ,
|  | completion_tracker & | tracker,
|  | const char * | ,
|  | const char * |
| ) |  |

Definition at line 1649 of file completer.c.

References complete_line_internal(), and handle_help.

Referenced by _initialize_cli_cmds(), and completer_handle_brkchars_func_for_completer().

## ◆ complete_expression()

void complete_expression | ( | completion_tracker & | tracker,
|  | const char * | text,
|  | const char * | word
| ) |  |

Definition at line 1015 of file completer.c.

References completion_tracker::add_completions(), add_struct_fields(), CATCH, check_typedef(), code, collect_symbol_completion_matches_type(), complete_files_symbols(), do_cleanups(), END_CATCH, make_cleanup(), parse_expression_for_completion(), RETURN_MASK_ERROR, TRY, TYPE_CODE, TYPE_CODE_PTR, TYPE_CODE_STRUCT, TYPE_CODE_UNDEF, TYPE_CODE_UNION, TYPE_IS_REFERENCE, TYPE_TARGET_TYPE, and xfree().

Referenced by complete_address_and_linespec_locations(), complete_linespec_component(), expression_completer(), and location_completer().

## ◆ complete_line()

void complete_line | ( | completion_tracker & | tracker,
|  | const char * | text,
|  | const char * | line_buffer,
|  | int | point
| ) |  |

Definition at line 1637 of file completer.c.

References complete_line_internal(), handle_completions, and max_completions.

Referenced by complete_command(), and gdb_rl_attempted_completion_function_throw().

## ◆ complete_source_filenames()

completion_list complete_source_filenames | ( | const char * | text | ) |

Definition at line 542 of file completer.c.

References gdb_completer_file_name_break_characters, and make_source_files_completion_list().

Referenced by complete_linespec_component().

## ◆ completer_handle_brkchars_func_for_completer()

completer_handle_brkchars_ftype* completer_handle_brkchars_func_for_completer | ( | completer_ftype * | fn | ) |

Definition at line 1796 of file completer.c.

References command_completer(), command_completer_handle_brkchars(), default_completer_handle_brkchars(), filename_completer(), filename_completer_handle_brkchars(), location_completer(), and location_completer_handle_brkchars().

Referenced by cmdpy_completer_handle_brkchars(), and complete_line_internal_normal_command().

## ◆ completion_find_completion_word()

const char* completion_find_completion_word | ( | completion_tracker & | tracker,
|  | const char * | text,
|  | int * | quote_char
| ) |  |

Definition at line 1886 of file completer.c.

References gdb_rl_completion_word_info::basic_quote_characters, complete_line_internal(), completion_tracker::custom_word_point(), gdb_assert, gdb_completer_quote_characters, gdb_rl_find_completion_word(), handle_brkchars, completion_tracker::quote_char(), gdb_rl_completion_word_info::quote_characters, completion_tracker::use_custom_word_point(), and gdb_rl_completion_word_info::word_break_characters.

Referenced by complete_command().

## ◆ expression_completer()

void expression_completer | ( | struct cmd_list_element * | ,
|  | completion_tracker & | tracker,
|  | const char * | ,
|  | const char * |
| ) |  |

Definition at line 1076 of file completer.c.

References complete_expression().

Referenced by _initialize_breakpoint(), _initialize_printcmd(), _initialize_tracepoint(), _initialize_typeprint(), and condition_completer().

## ◆ filename_completer()

void filename_completer | ( | struct cmd_list_element * | ,
|  | completion_tracker & | tracker,
|  | const char * | ,
|  | const char * |
| ) |  |

Definition at line 152 of file completer.c.

References completion_tracker::add_completion(), and make_completion_match_str().

Referenced by _initialize_auto_load(), _initialize_breakpoint(), _initialize_cli_cmds(), _initialize_cli_dump(), _initialize_compile(), _initialize_core(), _initialize_corelow(), _initialize_ctf(), _initialize_dwarf2_read(), _initialize_exec(), _initialize_infcmd(), _initialize_jit(), _initialize_record(), _initialize_record_full(), _initialize_source(), _initialize_step_skip(), _initialize_symfile(), _initialize_target_descriptions(), _initialize_tracefile_tfile(), add_dump_command(), add_setshow_filename_cmd(), add_setshow_optional_filename_cmd(), complete_line_internal_normal_command(), completer_handle_brkchars_func_for_completer(), init_cli_cmds(), initialize_inferiors(), and set_gdb_completion_word_break_characters().

## ◆ gdb_completion_word_break_characters()

char* gdb_completion_word_break_characters | ( | void |  | ) |

Definition at line 1863 of file completer.c.

References gdb_completer_state::aborted, CATCH, current_completion, END_CATCH, gdb_completion_word_break_characters_throw(), RETURN_MASK_ALL, and TRY.

Referenced by init_main().

## ◆ gdb_display_match_list()

void gdb_display_match_list | ( | char ** | matches,
|  | int | len,
|  | int | max,
|  | const struct match_list_displayer * |
| ) |  |

Definition at line 2819 of file completer.c.

References match_list_displayer::crlf, match_list_displayer::flush, gdb_assert, gdb_display_match_list_1(), gdb_get_y_or_n(), get_max_completions_reached_message(), max_completions, match_list_displayer::puts, and xsnprintf().

Referenced by cli_display_match_list(), and tui_rl_display_match_list().

## ◆ gdb_rl_attempted_completion_function()

char** gdb_rl_attempted_completion_function | ( | const char * | text,
|  | int | start,
|  | int | end
| ) |  |

Definition at line 2200 of file completer.c.

References gdb_completer_state::aborted, CATCH, current_completion, END_CATCH, gdb_org_rl_basic_quote_characters, gdb_rl_attempted_completion_function_throw(), RETURN_MASK_ALL, and TRY.

Referenced by init_main().

## ◆ get_gdb_completer_quote_characters()

const char* get_gdb_completer_quote_characters | ( | void |  | ) |

Definition at line 134 of file completer.c.

References gdb_completer_quote_characters.

Referenced by init_main().

## ◆ get_max_completions_reached_message()

const char* get_max_completions_reached_message | ( | void |  | ) |

Definition at line 2287 of file completer.c.

References _.

Referenced by complete_command(), and gdb_display_match_list().

## ◆ location_completer()

void location_completer | ( | struct cmd_list_element * | ,
|  | completion_tracker & | tracker,
|  | const char * | ,
|  | const char * |
| ) |  |

Definition at line 828 of file completer.c.

References completion_tracker::advance_custom_word_point_by(), advance_to_expression_complete_word_point(), complete_address_and_linespec_locations(), complete_explicit_location(), complete_expression(), complete_on_enum(), current_language, completion_tracker::custom_word_point(), explicit_options, explicit_location::func_name_match_type, get_explicit_location(), completion_tracker::have_completions(), explicit_completion_info::last_option, linespec_keywords, probe_options, explicit_completion_info::quoted_arg_end, explicit_completion_info::quoted_arg_start, explicit_completion_info::saw_explicit_location_option, completion_tracker::set_custom_word_point(), completion_tracker::set_quote_char(), skip_keyword(), string_to_explicit_location(), and WILD.

Referenced by _initialize_breakpoint(), _initialize_cli_cmds(), _initialize_infcmd(), _initialize_step_skip(), completer_handle_brkchars_func_for_completer(), and location_completer_handle_brkchars().

## ◆ make_completion_match_str() [1/2]

gdb::unique_xmalloc_ptr<char> make_completion_match_str | ( | const char * | match_name,
|  | const char * | text,
|  | const char * | word
| ) |  |

Definition at line 1603 of file completer.c.

References make_completion_match_str_1().

Referenced by add_filename_to_list(), complete_on_cmdlist(), complete_on_enum(), completion_list_add_name(), filename_completer(), interpreter_completer(), and completion_tracker::maybe_add_completion().

## ◆ make_completion_match_str() [2/2]

gdb::unique_xmalloc_ptr<char> make_completion_match_str | ( | gdb::unique_xmalloc_ptr< char > && | match_name,
|  | const char * | text,
|  | const char * | word
| ) |  |

Definition at line 1615 of file completer.c.

References make_completion_match_str_1().

## ◆ noop_completer()

void noop_completer | ( | struct cmd_list_element * | ,
|  | completion_tracker & | tracker,
|  | const char * | ,
|  | const char * |
| ) |  |

Definition at line 143 of file completer.c.

Referenced by _initialize_infcmd(), and _initialize_jit().

## ◆ reg_or_group_completer()

void reg_or_group_completer | ( | struct cmd_list_element * | ,
|  | completion_tracker & | tracker,
|  | const char * | ,
|  | const char * |
| ) |  |

Definition at line 1762 of file completer.c.

References complete_reggroup_names, complete_register_names, and reg_or_group_completer_1().

Referenced by _initialize_infcmd().

## ◆ reggroup_completer()

void reggroup_completer | ( | struct cmd_list_element * | ,
|  | completion_tracker & | tracker,
|  | const char * | ,
|  | const char * |
| ) |  |

Definition at line 1774 of file completer.c.

References complete_reggroup_names, and reg_or_group_completer_1().

Referenced by tui_reggroup_completer().

## ◆ set_rl_completer_word_break_characters()

void set_rl_completer_word_break_characters | ( | const char * | break_chars | ) |

Definition at line 1086 of file completer.c.

Referenced by command_completer_handle_brkchars(), complete_line_internal_1(), default_completer_handle_brkchars(), filename_completer_handle_brkchars(), init_main(), and set_gdb_completion_word_break_characters().

## ◆ signal_completer()

void signal_completer | ( | struct cmd_list_element * | ,
|  | completion_tracker & | tracker,
|  | const char * | ,
|  | const char * |
| ) |  |

Definition at line 1671 of file completer.c.

References completion_tracker::add_completion(), GDB_SIGNAL_FIRST, and gdb_signal_to_name().

Referenced by _initialize_break_catch_sig(), _initialize_infcmd(), and handle_completer().

## ◆ skip_quoted()

const char* skip_quoted | ( | const char * |  | ) |

Definition at line 2278 of file completer.c.

References skip_quoted_chars().

Referenced by yylex().

## ◆ skip_quoted_chars()

const char* skip_quoted_chars | ( | const char * | ,
|  | const char * | ,
|  | const char * |
| ) |  |

Definition at line 2235 of file completer.c.

References current_language, gdb_completer_quote_characters, language_defn::la_word_break_characters, and scan().

Referenced by skip_quoted().

## ◆ symbol_completer()

void symbol_completer | ( | struct cmd_list_element * | ,
|  | completion_tracker & | tracker,
|  | const char * | ,
|  | const char * |
| ) |  |

Definition at line 1111 of file completer.c.

References collect_symbol_completion_matches(), and EXPRESSION.

Referenced by do_add_cmd().

## Variable Documentation

## ◆ max_completions

int max_completions

Definition at line 1468 of file completer.c.

Referenced by _initialize_completer(), complete_command(), complete_line(), gdb_display_match_list(), and completion_tracker::maybe_add_completion().