diff options
Diffstat (limited to 'gdb/cli/cli-script.c')
-rw-r--r-- | gdb/cli/cli-script.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c index 47cad75..246fcc9 100644 --- a/gdb/cli/cli-script.c +++ b/gdb/cli/cli-script.c @@ -91,6 +91,7 @@ multi_line_command_p (enum command_control_type type) case while_stepping_control: case commands_control: case python_control: + case guile_control: return 1; default: return 0; @@ -274,6 +275,19 @@ print_command_lines (struct ui_out *uiout, struct command_line *cmd, continue; } + if (list->control_type == guile_control) + { + ui_out_field_string (uiout, NULL, "guile"); + ui_out_text (uiout, "\n"); + print_command_lines (uiout, *list->body_list, depth + 1); + if (depth) + ui_out_spaces (uiout, 2 * depth); + ui_out_field_string (uiout, NULL, "end"); + ui_out_text (uiout, "\n"); + list = list->next; + continue; + } + /* Ignore illegal command type and try next. */ list = list->next; } /* while (list) */ @@ -589,6 +603,7 @@ execute_control_command (struct command_line *cmd) } case python_control: + case guile_control: { eval_ext_lang_from_control_command (cmd); ret = simple_control; @@ -1028,6 +1043,11 @@ process_next_line (char *p, struct command_line **command, int parse_commands, here. */ *command = build_command_line (python_control, ""); } + else if (p_end - p == 5 && !strncmp (p, "guile", 5)) + { + /* Note that we ignore the inline "guile command" form here. */ + *command = build_command_line (guile_control, ""); + } else if (p_end - p == 10 && !strncmp (p, "loop_break", 10)) { *command = (struct command_line *) @@ -1115,7 +1135,8 @@ recurse_read_control_structure (char * (*read_next_line_func) (void), next = NULL; val = process_next_line (read_next_line_func (), &next, - current_cmd->control_type != python_control, + current_cmd->control_type != python_control + && current_cmd->control_type != guile_control, validator, closure); /* Just skip blanks and comments. */ |