aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-10-01 18:48:12 +0000
committerAndrew Cagney <cagney@redhat.com>2003-10-01 18:48:12 +0000
commit64f395bf19e16d115a17e91e62070032ba0553c5 (patch)
tree94c60160a0a874a55126701d2dab314e4c8b0b34 /gdb/infcmd.c
parentb7ca9213c770d9252c4059a9f302da229371b86d (diff)
downloadgdb-64f395bf19e16d115a17e91e62070032ba0553c5.zip
gdb-64f395bf19e16d115a17e91e62070032ba0553c5.tar.gz
gdb-64f395bf19e16d115a17e91e62070032ba0553c5.tar.bz2
2003-10-01 Andrew Cagney <cagney@redhat.com>
* 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.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c16
1 files changed, 14 insertions, 2 deletions
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));