2004-02-11 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / gdbarch.sh
index e35948e8e81624b97daa0dba5932ab0256a94942..08c6f3cac16aa76ecd0e52669aeaed34ce7c5f00 100755 (executable)
@@ -1,7 +1,10 @@
 #!/bin/sh -u
 
 # Architecture commands for GDB, the GNU debugger.
-# Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#
+# Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
+# Foundation, Inc.
+#
 #
 # This file is part of GDB.
 #
@@ -454,9 +457,6 @@ v:2:SP_REGNUM:int:sp_regnum::::-1:-1::0
 v:2:PC_REGNUM:int:pc_regnum::::-1:-1::0
 v:2:PS_REGNUM:int:ps_regnum::::-1:-1::0
 v:2:FP0_REGNUM:int:fp0_regnum::::0:-1::0
-# Replace DEPRECATED_NPC_REGNUM with an implementation of WRITE_PC
-# that updates PC, NPC and even NNPC.
-v:2:DEPRECATED_NPC_REGNUM:int:deprecated_npc_regnum::::0:-1::0
 # Convert stab register number (from \`r\' declaration) to a gdb REGNUM.
 f:2:STAB_REG_TO_REGNUM:int:stab_reg_to_regnum:int stab_regnr:stab_regnr:::no_op_reg_to_regnum::0
 # Provide a default mapping from a ecoff register number to a gdb REGNUM.
@@ -606,11 +606,7 @@ M:::enum return_value_convention:return_value:struct type *valtype, struct regca
 
 # 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.
+# into RETURN_VALUE.
 
 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
@@ -619,9 +615,27 @@ f:2:DEPRECATED_EXTRACT_RETURN_VALUE:void:deprecated_extract_return_value:struct
 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
-#
+# As of 2004-01-17 only the 32-bit SPARC ABI has been identified as an
+# ABI suitable for the implementation of a robust extract
+# struct-convention return-value address method (the sparc saves the
+# address in the callers frame).  All the other cases so far examined,
+# the DEPRECATED_EXTRACT_STRUCT_VALUE implementation has been
+# erreneous - the code was incorrectly assuming that the return-value
+# address, stored in a register, was preserved across the entire
+# function call.
+
+# For the moment retain DEPRECATED_EXTRACT_STRUCT_VALUE as a marker of
+# the ABIs that are still to be analyzed - perhaps this should simply
+# be deleted.  The commented out extract_returned_value_address method
+# is provided as a starting point for the 32-bit SPARC.  It, or
+# something like it, along with changes to both infcmd.c and stack.c
+# will be needed for that case to work.  NB: It is passed the callers
+# frame since it is only after the callee has returned that this
+# function is used.
+
+#M:::CORE_ADDR:extract_returned_value_address:struct frame_info *caller_frame:caller_frame
+F:2:DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:deprecated_extract_struct_value_address:struct regcache *regcache:regcache
+
 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
 #
@@ -637,7 +651,7 @@ v:2:FUNCTION_START_OFFSET:CORE_ADDR:function_start_offset::::0:::0
 #
 m::REMOTE_TRANSLATE_XFER_ADDRESS:void:remote_translate_xfer_address:struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len:regcache, gdb_addr, gdb_len, rem_addr, rem_len:::generic_remote_translate_xfer_address::0
 #
-v:2:FRAME_ARGS_SKIP:CORE_ADDR:frame_args_skip::::0:-1
+v::FRAME_ARGS_SKIP:CORE_ADDR:frame_args_skip::::0:::0
 f:2:FRAMELESS_FUNCTION_INVOCATION:int:frameless_function_invocation:struct frame_info *fi:fi:::generic_frameless_function_invocation_not::0
 F:2:DEPRECATED_FRAME_CHAIN:CORE_ADDR:deprecated_frame_chain:struct frame_info *frame:frame
 F:2:DEPRECATED_FRAME_CHAIN_VALID:int:deprecated_frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe
@@ -823,7 +837,9 @@ cat <<EOF
 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
 
 /* Dynamic architecture support for GDB, the GNU debugger.
-   Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
+   Software Foundation, Inc.
 
    This file is part of GDB.
 
This page took 0.023753 seconds and 4 git commands to generate.