This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] Fix Value returned is ...; Was: RFA: [configure.in] Turn on UI_OUT code
- To: Fernando Nasser <fnasser at cygnus dot com>
- Subject: [patch] Fix Value returned is ...; Was: RFA: [configure.in] Turn on UI_OUT code
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Fri, 12 Jan 2001 19:13:27 +0930
- Cc: gdb-patches at sources dot redhat dot com
- References: <3A35283C.A77EC44D@cygnus.com> <3A40A999.685C1A62@cygnus.com> <3A4125C2.F4E4A35@cygnus.com>
FYI,
I've checked in the attatched. The UI had a subtle change in output.
Andrew
Fri Jan 12 18:29:46 2001 Andrew Cagney <cagney@b1.cygnus.com>
* infcmd.c (print_return_value): Restore space lost by switch to
UIOUT. ``$NN='' should be ``$NN =''.
Fri Jan 12 18:29:01 2001 Andrew Cagney <cagney@b1.cygnus.com>
* gdb.base/callfuncs.exp: Add space after ``Value returned is''.
Index: infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.14
diff -p -r1.14 infcmd.c
*** infcmd.c 2000/12/15 01:01:47 1.14
--- infcmd.c 2001/01/12 09:41:12
*************** print_return_value (int structure_return
*** 1017,1023 ****
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, "= ");
value_print (value, stb->stream, 0, Val_no_prettyprint);
ui_out_field_stream (uiout, "return-value", stb);
ui_out_text (uiout, "\n");
--- 1017,1023 ----
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, " = ");
value_print (value, stb->stream, 0, Val_no_prettyprint);
ui_out_field_stream (uiout, "return-value", stb);
ui_out_text (uiout, "\n");
Index: testsuite/gdb.base/callfuncs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/callfuncs.exp,v
retrieving revision 1.2
diff -p -r1.2 callfuncs.exp
*** callfuncs.exp 2000/11/06 20:38:02 1.2
--- callfuncs.exp 2001/01/12 09:41:39
*************** if ![gdb_test "bt 2" \
*** 334,340 ****
# make sure we are back at main and still have the same register contents.
gdb_test "print add(4,5)" "The program being debugged stopped while.*" ""
gdb_test "finish" \
! "Value returned is.* = 9" \
"finish from call dummy breakpoint returns correct value"
if ![gdb_test "bt 2" \
"#0 main.*" \
--- 334,340 ----
# make sure we are back at main and still have the same register contents.
gdb_test "print add(4,5)" "The program being debugged stopped while.*" ""
gdb_test "finish" \
! "Value returned is .* = 9" \
"finish from call dummy breakpoint returns correct value"
if ![gdb_test "bt 2" \
"#0 main.*" \