aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorJackie Smith Cashion <jsmith@redhat.com>2001-12-13 22:42:23 +0000
committerJackie Smith Cashion <jsmith@redhat.com>2001-12-13 22:42:23 +0000
commite6ccd35f61cf792f387329dae86cadbcbee25049 (patch)
tree8d1eb937940ef4638d5463eea599e57221f9ad2a /gdb/cli
parent5d003c95923bce6c630e7c37873d667d0c273d0f (diff)
downloadfsf-binutils-gdb-e6ccd35f61cf792f387329dae86cadbcbee25049.zip
fsf-binutils-gdb-e6ccd35f61cf792f387329dae86cadbcbee25049.tar.gz
fsf-binutils-gdb-e6ccd35f61cf792f387329dae86cadbcbee25049.tar.bz2
gdb/ChangeLog
2001-12-13 Jackie Smith Cashion <jsmith@redhat.com> * cli/cli-script.c (print_command_lines): Remove extra "if", "else", "while", and "end" from show user output. testsuite/ChangeLog 2001-12-13 Jackie Smith Cashion <jsmith@redhat.com> * gdb.base/commands.exp (user_defined_command_test): Make "show user" test expect string more specific.
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-script.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 69fc4fb..3fb49f1 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -171,14 +171,13 @@ print_command_lines (struct ui_out *uiout, struct command_line *cmd,
/* A while command. Recursively print its subcommands and continue. */
if (list->control_type == while_control)
{
- ui_out_text (uiout, "while ");
ui_out_field_fmt (uiout, NULL, "while %s", list->line);
ui_out_text (uiout, "\n");
print_command_lines (uiout, *list->body_list, depth + 1);
- ui_out_field_string (uiout, NULL, "end");
if (depth)
ui_out_spaces (uiout, 2 * depth);
- ui_out_text (uiout, "end\n");
+ ui_out_field_string (uiout, NULL, "end");
+ ui_out_text (uiout, "\n");
list = list->next;
continue;
}
@@ -186,7 +185,6 @@ print_command_lines (struct ui_out *uiout, struct command_line *cmd,
/* An if command. Recursively print both arms before continueing. */
if (list->control_type == if_control)
{
- ui_out_text (uiout, "if ");
ui_out_field_fmt (uiout, NULL, "if %s", list->line);
ui_out_text (uiout, "\n");
/* The true arm. */
@@ -198,14 +196,14 @@ print_command_lines (struct ui_out *uiout, struct command_line *cmd,
if (depth)
ui_out_spaces (uiout, 2 * depth);
ui_out_field_string (uiout, NULL, "else");
- ui_out_text (uiout, "else\n");
+ ui_out_text (uiout, "\n");
print_command_lines (uiout, list->body_list[1], depth + 1);
}
- ui_out_field_string (uiout, NULL, "end");
if (depth)
ui_out_spaces (uiout, 2 * depth);
- ui_out_text (uiout, "end\n");
+ ui_out_field_string (uiout, NULL, "end");
+ ui_out_text (uiout, "\n");
list = list->next;
continue;
}