This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH, RFA] Fix discrepancy between UI_OUT and pre-UI_OUT
- To: gdb-patches at sources dot redhat dot com, fnasser at redhat dot com
- Subject: [PATCH, RFA] Fix discrepancy between UI_OUT and pre-UI_OUT
- From: Mark Kettenis <kettenis at wins dot uva dot nl>
- Date: Thu, 21 Dec 2000 21:12:07 +0100
Switching to UI_OUT uncovered the following discrepancy with the
pre-UI_OUT stuff:
Upon use of the `finish' command UI_OUT GDB prints something like
Value returned is $1= 1
whereas the old GDB printed
Value returned is $1 = 1
This triggered a few testsuite failures. OK to check in the attached
patch?
Mark
2000-12-21 Mark Kettenis <kettenis@gnu.org>
* infcmd.c (print_return_value) [UI_OUT]: Output extra space
before '='.
Index: infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.14
diff -u -p -r1.14 infcmd.c
--- infcmd.c 2000/12/15 01:01:47 1.14
+++ infcmd.c 2000/12/21 19:57:18
@@ -1017,7 +1017,7 @@ print_return_value (int structure_return
stb = ui_out_stream_new (uiout);
ui_out_text (uiout, "Value returned is ");
ui_out_field_fmt (uiout, "gdb-result-var", "$%d", record_latest_value (value));
- ui_out_text (uiout, "= ");
+ ui_out_text (uiout, " = ");
value_print (value, stb->stream, 0, Val_no_prettyprint);
ui_out_field_stream (uiout, "return-value", stb);
ui_out_text (uiout, "\n");
@@ -1049,7 +1049,7 @@ print_return_value (int structure_return
stb = ui_out_stream_new (uiout);
ui_out_text (uiout, "Value returned is ");
ui_out_field_fmt (uiout, "gdb-result-var", "$%d", record_latest_value (value));
- ui_out_text (uiout, "= ");
+ ui_out_text (uiout, " = ");
value_print (value, stb->stream, 0, Val_no_prettyprint);
ui_out_field_stream (uiout, "return-value", stb);
ui_out_text (uiout, "\n");