2004-06-20 Andrew Cagney <cagney@gnu.org>
* 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.
This commit is contained in:
parent
b5622e8d3c
commit
750eb019f1
11 changed files with 99 additions and 80 deletions
24
gdb/stack.c
24
gdb/stack.c
|
@ -1870,24 +1870,12 @@ If you continue, the return value that you specified will be ignored.\n";
|
|||
if (return_value != NULL)
|
||||
{
|
||||
struct type *return_type = VALUE_TYPE (return_value);
|
||||
if (!gdbarch_return_value_p (current_gdbarch))
|
||||
{
|
||||
STORE_RETURN_VALUE (return_type, current_regcache,
|
||||
VALUE_CONTENTS (return_value));
|
||||
}
|
||||
/* FIXME: cagney/2004-01-17: If extract_returned_value_address
|
||||
is available and the function is using
|
||||
RETURN_VALUE_STRUCT_CONVENTION, should use it to find the
|
||||
address of the returned value so that it can be assigned. */
|
||||
else
|
||||
{
|
||||
gdb_assert (gdbarch_return_value (current_gdbarch, return_type,
|
||||
NULL, NULL, NULL)
|
||||
== RETURN_VALUE_REGISTER_CONVENTION);
|
||||
gdbarch_return_value (current_gdbarch, return_type,
|
||||
current_regcache, NULL /*read*/,
|
||||
VALUE_CONTENTS (return_value) /*write*/);
|
||||
}
|
||||
gdb_assert (gdbarch_return_value (current_gdbarch, return_type,
|
||||
NULL, NULL, NULL)
|
||||
== RETURN_VALUE_REGISTER_CONVENTION);
|
||||
gdbarch_return_value (current_gdbarch, return_type,
|
||||
current_regcache, NULL /*read*/,
|
||||
VALUE_CONTENTS (return_value) /*write*/);
|
||||
}
|
||||
|
||||
/* If we are at the end of a call dummy now, pop the dummy frame
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue