diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-10-20 15:38:02 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-10-20 15:38:02 +0000 |
commit | 255dfa57f8971dea8651276304ddcf1bf15b7a89 (patch) | |
tree | 752cdc15686f00e42a3c989e7f0823e4537e30d1 /gdb/gdbarch.sh | |
parent | f8a0716db545a869f46623bfa7e7a84183e91ef1 (diff) | |
download | gdb-255dfa57f8971dea8651276304ddcf1bf15b7a89.tar.gz |
2003-10-20 Andrew Cagney <cagney@redhat.com>
* values.c (register_value_being_returned): Update comments. Use
"gdbarch_return_value" when available.
(using_struct_return): Ditto.
(set_return_value): Ditto. Use "gdbarch_return_value" when
available.. Print a warning, and not an error, when an unhandled
return type is encountered.
* infcmd.c: Include "gdb_assert.h".
(print_return_value): When gdbarch_return_value_p, and using
struct return, assume that the value is not available.
* defs.h (return_value_convention): Define.
* gdbarch.sh (gdbarch_return_value): New predicate method.
* gdbarch.h, gdbarch.c: Re-generate
* ppc-sysv-tdep.c (return_value_convention): Delete definition.
Index: doc/ChangeLog
2003-10-20 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Document
gdbarch_return_value. Add cross references from
USE_STRUCT_CONVENTION, EXTRACT_RETURN_VALUE, and
STORE_RETURN_VALUE, and from/to EXTRACT_STRUCT_VALUE_ADDRESS.
Diffstat (limited to 'gdb/gdbarch.sh')
-rwxr-xr-x | gdb/gdbarch.sh | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 3835ac0b940..8e1c0a44482 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -593,19 +593,33 @@ f:2:POINTER_TO_ADDRESS:CORE_ADDR:pointer_to_address:struct type *type, const voi f:2:ADDRESS_TO_POINTER:void:address_to_pointer:struct type *type, void *buf, CORE_ADDR addr:type, buf, addr:::unsigned_address_to_pointer::0 F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf:type, buf # -f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0 F:2:DEPRECATED_POP_FRAME:void:deprecated_pop_frame:void:- # NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS. F:2:DEPRECATED_STORE_STRUCT_RETURN:void:deprecated_store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp -# + +# It has been suggested that this, well actually its predecessor, +# should take the type/value of the function to be called and not the +# return type. This is left as an exercise for the reader. + +M:::enum return_value_convention:return_value:struct type *valtype, struct regcache *regcache, const void *inval, void *outval:valtype, regcache, inval, outval + +# The deprecated methods RETURN_VALUE_ON_STACK, EXTRACT_RETURN_VALUE, +# STORE_RETURN_VALUE and USE_STRUCT_CONVENTION have all been folded +# into RETURN_VALUE. For the moment do not try to fold in +# EXTRACT_STRUCT_VALUE_ADDRESS as, dependant on the ABI, the debug +# info, and the level of effort, it may well be possible to find the +# address of a structure being return on the stack. Someone else can +# make that change. + +f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0 f:2:EXTRACT_RETURN_VALUE:void:extract_return_value:struct type *type, struct regcache *regcache, void *valbuf:type, regcache, valbuf:::legacy_extract_return_value::0 f:2:STORE_RETURN_VALUE:void:store_return_value:struct type *type, struct regcache *regcache, const void *valbuf:type, regcache, valbuf:::legacy_store_return_value::0 f:2:DEPRECATED_EXTRACT_RETURN_VALUE:void:deprecated_extract_return_value:struct type *type, char *regbuf, char *valbuf:type, regbuf, valbuf f:2:DEPRECATED_STORE_RETURN_VALUE:void:deprecated_store_return_value:struct type *type, char *valbuf:type, valbuf -# +f:2:USE_STRUCT_CONVENTION:int:use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type:::generic_use_struct_convention::0 + F:2:EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:extract_struct_value_address:struct regcache *regcache:regcache F:2:DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:deprecated_extract_struct_value_address:char *regbuf:regbuf -f:2:USE_STRUCT_CONVENTION:int:use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type:::generic_use_struct_convention::0 # F:2:DEPRECATED_FRAME_INIT_SAVED_REGS:void:deprecated_frame_init_saved_regs:struct frame_info *frame:frame F:2:DEPRECATED_INIT_EXTRA_FRAME_INFO:void:deprecated_init_extra_frame_info:int fromleaf, struct frame_info *frame:fromleaf, frame |