2003-05-03 Andrew Cagney <cagney@redhat.com>

* gdbarch.sh (PUSH_DUMMY_CODE): New architecture method, add
	comments noteing that it replaces the old FIX_CALL_DUMMY code.
	* gdbarch.h, gdbarch.c: Re-generate.
	* d10v-tdep.c (d10v_push_dummy_code): New function.
	(d10v_gdbarch_init): Set push_dummy_code.
	* infcall.c (legacy_push_dummy_code): New function.
	(generic_push_dummy_code): New function.
	(push_dummy_code): New function.
	(call_function_by_hand): Call push_dummy_code.  Pass bp_addr,
	instead of dummy_addr, to push_dummy_call.  Move call to
	generic_save_call_dummy_addr to outside of CALL_DUMMY_LOCATION
	switch.
	* sparc-tdep.c (sparc_gdbarch_init): Mention push_dummy_code.

2003-05-03  Andrew Cagney  <cagney@redhat.com>

	* gdbint.texinfo (Target Architecture Definition): Document
	push_dummy_code.  Add cross references.
This commit is contained in:
Andrew Cagney
2003-05-03 19:39:23 +00:00
parent 92bf2b80f2
commit 7043d8dc5e
9 changed files with 321 additions and 78 deletions

View File

@ -3095,19 +3095,31 @@ call.
Should be deprecated in favor of a macro that uses target-byte-ordered
data.
This method has been replaced by @code{push_dummy_code}
(@pxref{push_dummy_code}).
@item SIZEOF_CALL_DUMMY_WORDS
@findex SIZEOF_CALL_DUMMY_WORDS
The size of @code{CALL_DUMMY_WORDS}. This must return a positive value.
See also @code{CALL_DUMMY_LENGTH}.
This method has been replaced by @code{push_dummy_code}
(@pxref{push_dummy_code}).
@item CALL_DUMMY
@findex CALL_DUMMY
A static initializer for @code{CALL_DUMMY_WORDS}. Deprecated.
This method has been replaced by @code{push_dummy_code}
(@pxref{push_dummy_code}).
@item CALL_DUMMY_LOCATION
@findex CALL_DUMMY_LOCATION
See the file @file{inferior.h}.
This method has been replaced by @code{push_dummy_code}
(@pxref{push_dummy_code}).
@item DEPRECATED_CALL_DUMMY_STACK_ADJUST
@findex DEPRECATED_CALL_DUMMY_STACK_ADJUST
Stack adjustment needed when performing an inferior function call. This
@ -3707,6 +3719,27 @@ Returns the updated top-of-stack pointer.
This method replaces @code{DEPRECATED_PUSH_ARGUMENTS}.
@item CORE_ADDR push_dummy_code (@var{gdbarch}, @var{sp}, @var{funaddr}, @var{using_gcc}, @var{args}, @var{nargs}, @var{value_type}, @var{real_pc}, @var{bp_addr})
@findex push_dummy_code
@findex FIX_CALL_DUMMY
@anchor{push_dummy_code} Given a stack based call dummy, push the
instruction sequence (including space for a breakpoint) to which the
called function should return.
Set @var{bp_addr} to the address at which the breakpoint instruction
should be inserted, @var{real_pc} to the resume address when starting
the call sequence, and return the updated inner-most stack address.
By default, the stack is grown sufficient to hold a frame-aligned
(@pxref{frame_align}) breakpoint, @var{bp_addr} is set to the address
reserved for that breakpoint, and @var{real_pc} set to @var{funaddr}.
This method replaces @code{CALL_DUMMY_WORDS},
@code{SIZEOF_CALL_DUMMY_WORDS}, @code{CALL_DUMMY},
@code{CALL_DUMMY_LOCATION}, @code{REGISTER_SIZE},
@code{GDB_TARGET_IS_HPPA}, @code{CALL_DUMMY_BREAKPOINT_OFFSET}, and
@code{FIX_CALL_DUMMY}.
@item DEPRECATED_PUSH_DUMMY_FRAME
@findex DEPRECATED_PUSH_DUMMY_FRAME
Used in @samp{call_function_by_hand} to create an artificial stack frame.