[patch rfc] TARGET_WRITE_SP -> DEPRECATED_DUMMY_WRITE_SP
Andrew Cagney
ac131313@redhat.com
Fri Mar 28 15:56:00 GMT 2003
Hello,
The attached patch replaces TARGET_WRITE_SP with
DEPRECATED_DUMMY_WRITE_SP. Instead of providing this method, an
architecture is expected to update the stack pointer as part of creating
the fake call-frame (in push_dummy_call()).
To make DEPRECATED_DUMMY_WRITE_SP optional, all the existing targets
(except the d10v) were updated to explicitly set this new method
(gdb_mbuild.sh rules m'kay).
In addition, it alters the valops.c logic that decides if/when
DEPRECATED_DUMMY_WRITE_SP() should be called:
stored the stack pointer (as part of creating the fake call
frame), and none of the code following that code adjusts the
stack-pointer value, the below call is entirely redundant. */
- if (!gdbarch_push_dummy_call_p (current_gdbarch))
- TARGET_WRITE_SP (sp);
+ if (DEPRECATED_DUMMY_WRITE_SP_P ())
+ DEPRECATED_DUMMY_WRITE_SP (sp);
if (SAVE_DUMMY_FRAME_TOS_P ())
SAVE_DUMMY_FRAME_TOS (sp);
By doing this, migrating to push_dummy_call() from push_arguments() is
much easier. The SP code can be moved over separate to switching to
push_dummy_call().
I'll look to commit in a few days,
Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20030328/c59202a7/attachment.ksh>
More information about the Gdb-patches
mailing list