GDB (xrefs)

Classes | Typedefs | Enumerations | Functions
cli-script.h File Reference

Go to the source code of this file.

## Classes
struct | command_line
struct | command_lines_deleter

## Typedefs
typedef std::unique_ptr< command_line, command_lines_deleter > | command_line_up

## Enumerations
enum | misc_command_type { ok_command, end_command, else_command, nop_command }
enum | command_control_type { simple_control, break_control, continue_control, while_control, if_control, commands_control, python_control, compile_control, guile_control, while_stepping_control, invalid_control }

## Functions
void | free_command_lines (struct command_line **)
command_line_up | read_command_lines (char *, int, int, void(*)(char *, void *), void *)
command_line_up | read_command_lines_1 (char *(*)(void), int, void(*)(char *, void *), void *)
void | script_from_file (FILE *stream, const char *file)
void | show_user_1 (struct cmd_list_element *c, const char *prefix, const char *name, struct ui_file *stream)
enum command_control_type | execute_control_command (struct command_line *cmd)
enum command_control_type | execute_control_command_untraced (struct command_line *cmd)
command_line_up | get_command_line (enum command_control_type, const char *)
void | print_command_lines (struct ui_out *, struct command_line *, unsigned int)
command_line_up | copy_command_lines (struct command_line *cmds)
void | execute_user_command (struct cmd_list_element *c, const char *args)
std::string | insert_user_defined_cmd_args (const char *line)
void | print_command_trace (const char *cmd)
void | reset_command_nest_depth (void)

## Typedef Documentation

## ◆ command_line_up

typedef std::unique_ptr<command_line, command_lines_deleter> command_line_up

Definition at line 88 of file cli-script.h.

## Enumeration Type Documentation

## ◆ command_control_type

enum command_control_type

Enumerator
simple_control |
break_control |
continue_control |
while_control |
if_control |
commands_control |
python_control |
compile_control |
guile_control |
while_stepping_control |
invalid_control |

Definition at line 33 of file cli-script.h.

## ◆ misc_command_type

enum misc_command_type

Control types for commands.

Enumerator
ok_command |
end_command |
else_command |
nop_command |

Definition at line 25 of file cli-script.h.

## Function Documentation

## ◆ copy_command_lines()

command_line_up copy_command_lines | ( | struct command_line * | cmds | ) |

Definition at line 1333 of file cli-script.c.

References command_line::body_count, command_line::body_list, command_line::control_type, copy_command_lines(), command_line::line, command_line::next, XNEW, and XNEWVEC.

Referenced by commands_command_1(), and copy_command_lines().

## ◆ execute_control_command()

enum command_control_type execute_control_command | ( | struct command_line * | cmd | ) |

Definition at line 650 of file cli-script.c.

## ◆ execute_control_command_untraced()

enum command_control_type execute_control_command_untraced | ( | struct command_line * | cmd | ) |

Definition at line 665 of file cli-script.c.

References execute_control_command(), and suppress_next_print_command_trace.

Referenced by compile_code_command(), compile_print_command(), guile_command(), if_command(), python_command(), and while_command().

## ◆ execute_user_command()

void execute_user_command | ( | struct cmd_list_element * | c,
|  | const char * | args
| ) |  |

Definition at line 388 of file cli-script.c.

References _, ui::async, break_control, command_nest_depth, current_ui, error(), execute_control_command(), ui::instream, make_scoped_restore(), max_user_call_depth, command_line::next, simple_control, user_args_stack, cmd_list_element::user_commands, and warning().

Referenced by execute_cmd_post_hook(), execute_cmd_pre_hook(), and execute_command().

## ◆ free_command_lines()

void free_command_lines | ( | struct command_line ** |  | ) |

Definition at line 1309 of file cli-script.c.

References command_line::body_count, command_line::body_list, free_command_lines(), command_line::line, command_line::next, and xfree().

Referenced by define_command(), free_command_lines(), and command_lines_deleter::operator()().

## ◆ get_command_line()

command_line_up get_command_line | ( | enum | command_control_type,
|  | const char * |
| ) |  |

Definition at line 170 of file cli-script.c.

References _, build_command_line(), invalid_control, read_next_line(), recurse_read_control_structure(), and warning().

Referenced by compile_code_command(), compile_print_command(), guile_command(), if_command(), python_command(), and while_command().

## ◆ insert_user_defined_cmd_args()

std::string insert_user_defined_cmd_args | ( | const char * | line | ) |

Definition at line 788 of file cli-script.c.

References user_args_stack.

Referenced by eval_command(), and execute_control_command_1().

## ◆ print_command_lines()

void print_command_lines | ( | struct ui_out * | ,
|  | struct command_line * | ,
|  | unsigned | int
| ) |  |

Definition at line 189 of file cli-script.c.

## ◆ print_command_trace()

void print_command_trace | ( | const char * | cmd | ) |

Definition at line 447 of file cli-script.c.

References command_nest_depth, printf_filtered(), source_verbose, suppress_next_print_command_trace, and trace_commands.

Referenced by execute_command(), and execute_control_command_1().

## ◆ read_command_lines()

command_line_up read_command_lines | ( | char * | ,
|  | int | ,
|  | int | ,
|  | void(*)(char *, void *) | ,
|  | void * |
| ) |  |

Definition at line 1198 of file cli-script.c.

References current_interp_named_p(), current_ui, deprecated_readline_begin_hook, deprecated_readline_end_hook, END_MESSAGE, gdb_flush(), gdb_stdout, input_interactive_p(), INTERP_CONSOLE, printf_unfiltered(), read_command_lines_1(), and read_next_line().

Referenced by actions_command(), define_command(), and document_command().

## ◆ read_command_lines_1()

command_line_up read_command_lines_1 | ( | char * | *)(void,
|  | int | ,
|  | void(*)(char *, void *) | ,
|  | void * |
| ) |  |

## ◆ reset_command_nest_depth()

void reset_command_nest_depth | ( | void |  | ) |

Definition at line 430 of file cli-script.c.

References command_nest_depth, and suppress_next_print_command_trace.

Referenced by display_gdb_prompt().

## ◆ script_from_file()

void script_from_file | ( | FILE * | stream,
|  | const char * | file
| ) |  |

Definition at line 1578 of file cli-script.c.

References _, ui::async, CATCH, current_ui, END_CATCH, internal_error(), make_scoped_restore(), read_command_file(), RETURN_MASK_ERROR, source_file_name, source_line_number, throw_error(), and TRY.

Referenced by source_gdb_objfile_script(), source_gdb_script(), and source_script_from_stream().

## ◆ show_user_1()

void show_user_1 | ( | struct cmd_list_element * | c,
|  | const char * | prefix,
|  | const char * | name,
|  | struct ui_file * | stream
| ) |  |

Definition at line 1610 of file cli-script.c.

References class_user, current_uiout, fprintf_filtered(), fputs_filtered(), gdb_stdout, cmd_list_element::name, name, cmd_list_element::next, cmd_list_element::prefixlist, cmd_list_element::prefixname, print_command_lines(), show_user_1(), cmd_list_element::theclass, and cmd_list_element::user_commands.

Referenced by show_user(), and show_user_1().