aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-02-27 17:48:48 +0000
committerAndrew Cagney <cagney@redhat.com>2003-02-27 17:48:48 +0000
commitf3824013e0e5ea9b81760142c36779eadf7722d3 (patch)
treeac3981b952d177e99a6c7e9585f0f76acc21d883 /gdb/valops.c
parentef8038066b973eed9c7fcfc963beb5d5c1b4663b (diff)
downloadfsf-binutils-gdb-f3824013e0e5ea9b81760142c36779eadf7722d3.zip
fsf-binutils-gdb-f3824013e0e5ea9b81760142c36779eadf7722d3.tar.gz
fsf-binutils-gdb-f3824013e0e5ea9b81760142c36779eadf7722d3.tar.bz2
2003-02-27 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_PUSH_DUMMY_FRAME): Procedure with predicate. Replaces PUSH_DUMMY_FRAME. * gdbarch.h, gdbarch.c: Regnerate. * valops.c (hand_function_call): Update. Call generic_push_dummy_frame directly. * vax-tdep.c (vax_gdbarch_init): Update. * sparc-tdep.c (sparc_gdbarch_init): Update. * ns32k-tdep.c (ns32k_gdbarch_init): Update. * m68k-tdep.c (m68k_gdbarch_init): Update. * hppa-tdep.c (hppa_gdbarch_init): Update. * alpha-tdep.c (alpha_gdbarch_init): Update. * config/sparc/tm-sparc.h (DEPRECATED_PUSH_DUMMY_FRAME): Update. * config/pa/tm-hppa.h (DEPRECATED_PUSH_DUMMY_FRAME): Update. * inferior.h (PUSH_DUMMY_FRAME): Delete definition. * xstormy16-tdep.c (xstormy16_gdbarch_init): Don't set push_dummy_frame to generic_push_dummy_frame. * v850-tdep.c (v850_gdbarch_init): Ditto. * sh-tdep.c (sh_gdbarch_init): Ditto. * s390-tdep.c (s390_gdbarch_init): Ditto. * rs6000-tdep.c (rs6000_gdbarch_init): Ditto. * mn10300-tdep.c (mn10300_gdbarch_init): Ditto. * mips-tdep.c (mips_gdbarch_init): Ditto. * mcore-tdep.c (mcore_gdbarch_init): Ditto. * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto. * ia64-tdep.c (ia64_gdbarch_init): Ditto. * i386-tdep.c (i386_gdbarch_init): Ditto. * h8300-tdep.c (h8300_gdbarch_init): Ditto. * frv-tdep.c (frv_gdbarch_init): Ditto. * d10v-tdep.c (d10v_gdbarch_init): Ditto. * cris-tdep.c (cris_gdbarch_init): Ditto. * avr-tdep.c (avr_gdbarch_init): Ditto. * arm-tdep.c (arm_gdbarch_init): Ditto.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index bd340e8..6dcc6f1 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1300,10 +1300,34 @@ hand_function_call (struct value *function, int nargs, struct value **args)
inf_status = save_inferior_status (1);
inf_status_cleanup = make_cleanup_restore_inferior_status (inf_status);
- /* PUSH_DUMMY_FRAME is responsible for saving the inferior registers
- (and POP_FRAME for restoring them). (At least on most machines)
- they are saved on the stack in the inferior. */
- PUSH_DUMMY_FRAME;
+ if (DEPRECATED_PUSH_DUMMY_FRAME_P ())
+ {
+ /* DEPRECATED_PUSH_DUMMY_FRAME is responsible for saving the
+ inferior registers (and POP_FRAME for restoring them). (At
+ least on most machines) they are saved on the stack in the
+ inferior. */
+ DEPRECATED_PUSH_DUMMY_FRAME;
+ }
+ else
+ {
+ /* FIXME: cagney/2003-02-26: Step zero of this little tinker is
+ to extract the generic dummy frame code from the architecture
+ vector. Hence this direct call.
+
+ A follow-on change is to modify this interface so that it takes
+ thread OR frame OR tpid as a parameter, and returns a dummy
+ frame handle. The handle can then be used further down as a
+ parameter SAVE_DUMMY_FRAME_TOS. Hmm, thinking about it, since
+ everything is ment to be using generic dummy frames, why not
+ even use some of the dummy frame code to here - do a regcache
+ dup and then pass the duped regcache, along with all the other
+ stuff, at one single point.
+
+ In fact, you can even save the structure's return address in the
+ dummy frame and fix one of those nasty lost struct return edge
+ conditions. */
+ generic_push_dummy_frame ();
+ }
old_sp = read_sp ();