[commit] Delete deprecated_push_arguments
Mark Kettenis
mark.kettenis@xs4all.nl
Fri Sep 2 19:03:00 GMT 2005
Nothing uses this anymore. Now that push_dummy_call is the only
supported mechanism for doing inferior function calls, I moved the
check for its presence to the start of call_function_by_hand. There
really is no point in doing a lot of work only to find out that the
crucial bit isn't implemented.
Committed,
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* infcall.c (call_function_by_hand): Remove code handling
deprecated_push_arguments. Bail out early if push_dummy_call
isn't available.
* gdbarch.sh (deprecated_push_arguments): Delete. Adjust a few
comments accordingly.
* gdbarch.h, gdbarch.c: Regenerate.
Index: infcall.c
===================================================================
RCS file: /cvs/src/src/gdb/infcall.c,v
retrieving revision 1.72
diff -u -p -r1.72 infcall.c
--- infcall.c 21 Aug 2005 09:34:19 -0000 1.72
+++ infcall.c 2 Sep 2005 18:57:01 -0000
@@ -333,6 +333,9 @@ call_function_by_hand (struct value *fun
if (!target_has_execution)
noprocess ();
+ if (!gdbarch_push_dummy_call_p (current_gdbarch))
+ error (_("This target does not support function calls"));
+
/* Create a cleanup chain that contains the retbuf (buffer
containing the register values). This chain is create BEFORE the
inf_status chain so that the inferior status can cleaned up
@@ -653,19 +656,9 @@ You must use a pointer to function type
/* Create the dummy stack frame. Pass in the call dummy address as,
presumably, the ABI code knows where, in the call dummy, the
return address should be pointed. */
- if (gdbarch_push_dummy_call_p (current_gdbarch))
- /* When there is no push_dummy_call method, should this code
- simply error out. That would the implementation of this method
- for all ABIs (which is probably a good thing). */
- sp = gdbarch_push_dummy_call (current_gdbarch, function, current_regcache,
- bp_addr, nargs, args, sp, struct_return,
- struct_addr);
- else if (DEPRECATED_PUSH_ARGUMENTS_P ())
- /* Keep old targets working. */
- sp = DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return,
- struct_addr);
- else
- error (_("This target does not support function calls"));
+ sp = gdbarch_push_dummy_call (current_gdbarch, function, current_regcache,
+ bp_addr, nargs, args, sp, struct_return,
+ struct_addr);
/* Set up a frame ID for the dummy frame so we can pass it to
set_momentary_breakpoint. We need to give the breakpoint a frame
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.361
diff -u -p -r1.361 gdbarch.sh
--- gdbarch.sh 14 May 2005 06:07:41 -0000 1.361
+++ gdbarch.sh 2 Sep 2005 18:57:02 -0000
@@ -469,11 +469,8 @@ M::struct frame_id:unwind_dummy_id:struc
# DEPRECATED_FP_REGNUM.
v:=:int:deprecated_fp_regnum:::-1:-1::0
-# See gdbint.texinfo. See infcall.c. New, all singing all dancing,
-# replacement for DEPRECATED_PUSH_ARGUMENTS.
+# See gdbint.texinfo. See infcall.c.
M::CORE_ADDR:push_dummy_call:struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr
-# PUSH_DUMMY_CALL is a direct replacement for DEPRECATED_PUSH_ARGUMENTS.
-F:=:CORE_ADDR:deprecated_push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr
# DEPRECATED_REGISTER_SIZE can be deleted.
v:=:int:deprecated_register_size
v:=:int:call_dummy_location::::AT_ENTRY_POINT::0
@@ -501,7 +498,7 @@ f:=:CORE_ADDR:pointer_to_address:struct
f:=:void:address_to_pointer:struct type *type, gdb_byte *buf, CORE_ADDR addr:type, buf, addr::unsigned_address_to_pointer::0
M::CORE_ADDR:integer_to_address:struct type *type, const gdb_byte *buf:type, buf
#
-# NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS.
+# NOTE: kettenis/2005-09-01: Replaced by PUSH_DUMMY_CALL.
F:=:void:deprecated_store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp
# It has been suggested that this, well actually its predecessor,
More information about the Gdb-patches
mailing list