diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-10-23 22:36:14 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-10-23 22:36:14 +0000 |
commit | fc70c2a0cba36eb1500c89821c59bd0be86bdc24 (patch) | |
tree | 56d052d27dc97bc83b354d58c7e2730080d8c5da /gdb/values.c | |
parent | 4afcc5985a050978c2811a89e7dc561abf2e563f (diff) | |
download | fsf-binutils-gdb-fc70c2a0cba36eb1500c89821c59bd0be86bdc24.zip fsf-binutils-gdb-fc70c2a0cba36eb1500c89821c59bd0be86bdc24.tar.gz fsf-binutils-gdb-fc70c2a0cba36eb1500c89821c59bd0be86bdc24.tar.bz2 |
2003-10-23 Andrew Cagney <cagney@redhat.com>
* Makefile.in (stack.o): Add $(regcache_h).
* stack.c: Include "regcache.h"
(return_command): Rewrite. Use get_frame_id and
get_selected_frame. Eliminate "deprecated_selected_frame". Warn
about unhandled return-values.
* value.h (set_return_value): Delete declaration.
* values.c (set_return_value): Delete function.
Diffstat (limited to 'gdb/values.c')
-rw-r--r-- | gdb/values.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/gdb/values.c b/gdb/values.c index da5c180..aba500c 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -1306,58 +1306,6 @@ using_struct_return (struct type *value_type, int gcc_p) == RETURN_VALUE_STRUCT_CONVENTION); } -/* Store VAL so it will be returned if a function returns now. - Does not verify that VAL's type matches what the current - function wants to return. */ - -void -set_return_value (struct value *val) -{ - struct type *type = check_typedef (VALUE_TYPE (val)); - enum type_code code = TYPE_CODE (type); - - if (code == TYPE_CODE_ERROR) - error ("Function return type unknown."); - - if (gdbarch_return_value_p (current_gdbarch)) - { - switch (gdbarch_return_value (current_gdbarch, type, NULL, NULL, NULL)) - { - case RETURN_VALUE_REGISTER_CONVENTION: - /* Success. The architecture can deal with it, write it to - the regcache. */ - gdbarch_return_value (current_gdbarch, type, current_regcache, - VALUE_CONTENTS (val), NULL); - return; - case RETURN_VALUE_STRUCT_CONVENTION: - /* Failure. For the moment, assume that it is not possible - to find the location, on the stack, at which the "struct - return" value should be stored. Only a warning because - an error aborts the "return" command leaving GDB in a - weird state. */ - warning ("Location of return value unknown"); - return; - } - } - - - if (code == TYPE_CODE_STRUCT - || code == TYPE_CODE_UNION) /* FIXME, implement struct return. */ - /* FIXME: cagney/2003-10-20: This should be an internal-warning. - The problem is that while GDB's core supports "struct return" - using "register convention", many architectures haven't been - updated to implement the mechanisms needed to make it work. - It's a warning, and not an error, as otherwize it will jump out - of the "return" command leaving both GDB and the user in a very - confused state. */ - { - warning ("This architecture does not support specifying a struct or union return-value."); - return; - } - - STORE_RETURN_VALUE (type, current_regcache, VALUE_CONTENTS (val)); -} - void _initialize_values (void) { |