This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
RFA: "show user" output
- To: GDB Patches <gdb-patches at sources dot redhat dot com>
- Subject: RFA: "show user" output
- From: Jackie Smith Cashion <jsmith at redhat dot com>
- Date: Thu, 06 Sep 2001 16:53:21 -0500
I recently noticed that the "show user" output is messed up. The "if",
"else", "while", and "end" keywords are printed twice on the line. I
have attached a patch that fixes this.
This is the first RFA I've submitted. I'll probably need some pointers
on the approval and check in process.
--
Jackie Smith Cashion
email: jsmith@redhat.com
phone: 931 438 2432
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.1590
diff -c -3 -p -r1.1590 ChangeLog
*** ChangeLog 2001/09/05 23:44:43 1.1590
--- ChangeLog 2001/09/06 21:36:28
***************
*** 1,3 ****
--- 1,8 ----
+ 2001-09-06 Jackie Smith Cashion <jsmith@redhat.com>
+
+ * cli/cli-script.c (print_command_lines): Remove extra
+ "if", "else", "while", and "end" from show user output.
+
2001-09-05 Elena Zannoni <ezannoni@redhat.com>
* gdbarch.sh: Move include of dis-asm.h so it is generated earlier
Index: cli/cli-script.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-script.c,v
retrieving revision 1.7
diff -c -3 -p -r1.7 cli-script.c
*** cli-script.c 2001/06/17 15:16:12 1.7
--- cli-script.c 2001/09/06 21:36:32
*************** print_command_lines (struct ui_out *uiou
*** 171,181 ****
/* 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");
--- 171,179 ----
*************** print_command_lines (struct ui_out *uiou
*** 186,192 ****
/* 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. */
--- 184,189 ----
*************** print_command_lines (struct ui_out *uiou
*** 197,208 ****
{
if (depth)
ui_out_spaces (uiout, 2 * depth);
- ui_out_field_string (uiout, NULL, "else");
ui_out_text (uiout, "else\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");
--- 194,203 ----