From 64f395bf19e16d115a17e91e62070032ba0553c5 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Wed, 1 Oct 2003 18:48:12 +0000 Subject: 2003-10-01 Andrew Cagney * infcall.c (call_function_by_hand): When STRUCT_RETURN, always use STRUCT_ADDR. When not using "struct return convention", pass "0" to "value_being_returned". Add FIXMEs. * infcmd.c (print_return_value): Pass an explicit 0/1 to value_being_returned. Add comments. * values.c (value_being_returned): Add fixme. * hppa-tdep.c (hppa_extract_struct_value_address): Add FIXME. (hppa_value_returned_from_stack): Add FIXME. --- gdb/infcmd.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'gdb/infcmd.c') diff --git a/gdb/infcmd.c b/gdb/infcmd.c index f232fd5..9fa0559 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1070,7 +1070,7 @@ print_return_value (int structure_return, struct type *value_type) if (!structure_return) { - value = value_being_returned (value_type, stop_registers, structure_return); + value = value_being_returned (value_type, stop_registers, 0); 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)); @@ -1081,6 +1081,18 @@ print_return_value (int structure_return, struct type *value_type) } else { + /* FIXME: 2003-09-27: This code block should be handling the + "use struct convention" case, and not the function + value_being_returned. This would allow the dramatic + simplification of value_being_returned (perhaphs renamed to + register_value_being_returned). */ + /* FIXME: 2003-09-27: When returning from a nested inferior + function call, it's possible (with no help from the + architecture vector) to locate and return/print a "struct + return" value. This is just a more complicated case of what + is already being done in in the inferior function call code. + In fact, when inferior function calls are made async, this + will likely be made the norm. */ /* We cannot determine the contents of the structure because it is on the stack, and we don't know where, since we did not initiate the call, as opposed to the call_function_by_hand case */ @@ -1091,7 +1103,7 @@ print_return_value (int structure_return, struct type *value_type) ui_out_text (uiout, "."); ui_out_text (uiout, " Cannot determine contents\n"); #else - value = value_being_returned (value_type, stop_registers, structure_return); + value = value_being_returned (value_type, stop_registers, 1); 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)); -- cgit v1.1