From 750eb019f10b80dfed775e0062e33326f5a79adb Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sun, 20 Jun 2004 18:10:14 +0000 Subject: 2004-06-20 Andrew Cagney * gdbarch.sh (RETURN_VALUE): Default to legacy_return_value. * gdbarch.h, gdbarch.c: Re-generate. * Makefile.in (arch-utils.o): Update dependencies. * values.c (using_struct_return): Move code calling USE_STRUCT_CONVENTION to legacy_return_value, simplify. * stack.c (return_command): Move code calling STORE_RETURN_VALUE to legacy_return_value, simplify. * infcmd.c (print_return_value): Move code calling DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS and EXTRACT_RETURN_VALUE to legacy_return_value, simplify. * infcall.c (call_function_by_hand): Move code calling EXTRACT_RETURN_VALUE to legacy_return_value, simplify. * arch-utils.c: Update copyright. Include "gdbcore.h". (legacy_return_value): New function. * arch-utils.h: Update copyright. (legacy_return_value): Declare. --- gdb/infcall.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'gdb/infcall.c') diff --git a/gdb/infcall.c b/gdb/infcall.c index 8d89101..9e3e479 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -939,7 +939,7 @@ the function call).", name); "struct return convention", check that PUSH_DUMMY_CALL isn't playing tricks. */ retval = value_at (value_type, struct_addr, NULL); - else if (gdbarch_return_value_p (current_gdbarch)) + else { /* This code only handles "register convention". */ retval = allocate_value (value_type); @@ -950,15 +950,6 @@ the function call).", name); VALUE_CONTENTS_RAW (retval) /*read*/, NULL /*write*/); } - else - { - /* NOTE: cagney/2003-10-20: Unlike "gdbarch_return_value", the - EXTRACT_RETURN_VALUE and DEPRECATED_USE_STRUCT_CONVENTION - methods do not handle the edge case of a function returning - a small structure / union in registers. */ - retval = allocate_value (value_type); - EXTRACT_RETURN_VALUE (value_type, retbuf, VALUE_CONTENTS_RAW (retval)); - } do_cleanups (retbuf_cleanup); return retval; } -- cgit v1.1