From 8f536afe352ac7b4c8135e2085d192c46ea45d0a Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Fri, 12 Oct 2007 15:32:50 +0000 Subject: [PATCH] * infcmd.c (print_return_value): Remove STRUCT_RETURN argument. (finish_command_continuation, finish_command): Adapt callers. --- gdb/ChangeLog | 5 +++++ gdb/infcmd.c | 32 ++++++-------------------------- 2 files changed, 11 insertions(+), 26 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3bc050a5c4..f809c7ec3d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2007-10-12 Ulrich Weigand + + * infcmd.c (print_return_value): Remove STRUCT_RETURN argument. + (finish_command_continuation, finish_command): Adapt callers. + 2007-10-12 Ulrich Weigand * infcall.c (call_function_by_hand): Remove special handling diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 9cb51a48df..509e95a1cb 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -66,7 +66,7 @@ void interrupt_target_command (char *args, int from_tty); static void nofp_registers_info (char *, int); -static void print_return_value (int struct_return, struct type *value_type); +static void print_return_value (struct type *value_type); static void finish_command_continuation (struct continuation_arg *); @@ -1160,7 +1160,7 @@ advance_command (char *arg, int from_tty) /* Print the result of a function at the end of a 'finish' command. */ static void -print_return_value (int struct_return, struct type *value_type) +print_return_value (struct type *value_type) { struct gdbarch *gdbarch = current_gdbarch; struct cleanup *old_chain; @@ -1240,25 +1240,14 @@ finish_command_continuation (struct continuation_arg *arg) && function != NULL) { struct type *value_type; - int struct_return; - int gcc_compiled; value_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (function)); if (!value_type) internal_error (__FILE__, __LINE__, _("finish_command: function has no target type")); - if (TYPE_CODE (value_type) == TYPE_CODE_VOID) - { - do_exec_cleanups (cleanups); - return; - } - - CHECK_TYPEDEF (value_type); - gcc_compiled = BLOCK_GCC_COMPILED (SYMBOL_BLOCK_VALUE (function)); - struct_return = using_struct_return (value_type, gcc_compiled); - - print_return_value (struct_return, value_type); + if (TYPE_CODE (value_type) != TYPE_CODE_VOID) + print_return_value (value_type); } do_exec_cleanups (cleanups); @@ -1363,23 +1352,14 @@ finish_command (char *arg, int from_tty) && function != NULL) { struct type *value_type; - int struct_return; - int gcc_compiled; value_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (function)); if (!value_type) internal_error (__FILE__, __LINE__, _("finish_command: function has no target type")); - /* FIXME: Shouldn't we do the cleanups before returning? */ - if (TYPE_CODE (value_type) == TYPE_CODE_VOID) - return; - - CHECK_TYPEDEF (value_type); - gcc_compiled = BLOCK_GCC_COMPILED (SYMBOL_BLOCK_VALUE (function)); - struct_return = using_struct_return (value_type, gcc_compiled); - - print_return_value (struct_return, value_type); + if (TYPE_CODE (value_type) != TYPE_CODE_VOID) + print_return_value (value_type); } do_cleanups (old_chain);