aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-11-06 18:06:00 +0000
committerAndrew Cagney <cagney@redhat.com>2001-11-06 18:06:00 +0000
commit69a0d5f4faf69df010fda32619a31359d4bedf04 (patch)
treedf68e564237bc70eafdecf94786c3548605306e9 /gdb/valops.c
parentf8deed93c68458a446ff52314e008c910e26a1a5 (diff)
downloadgdb-69a0d5f4faf69df010fda32619a31359d4bedf04.zip
gdb-69a0d5f4faf69df010fda32619a31359d4bedf04.tar.gz
gdb-69a0d5f4faf69df010fda32619a31359d4bedf04.tar.bz2
Add predicate for PUSH_RETURN_ADDRESS.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 22c6948..e0642ee 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1570,18 +1570,18 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
sp = PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr);
-#ifdef PUSH_RETURN_ADDRESS /* for targets that use no CALL_DUMMY */
- /* There are a number of targets now which actually don't write any
- CALL_DUMMY instructions into the target, but instead just save the
- machine state, push the arguments, and jump directly to the callee
- function. Since this doesn't actually involve executing a JSR/BSR
- instruction, the return address must be set up by hand, either by
- pushing onto the stack or copying into a return-address register
- as appropriate. Formerly this has been done in PUSH_ARGUMENTS,
- but that's overloading its functionality a bit, so I'm making it
- explicit to do it here. */
- sp = PUSH_RETURN_ADDRESS (real_pc, sp);
-#endif /* PUSH_RETURN_ADDRESS */
+ if (PUSH_RETURN_ADDRESS_P ())
+ /* for targets that use no CALL_DUMMY */
+ /* There are a number of targets now which actually don't write
+ any CALL_DUMMY instructions into the target, but instead just
+ save the machine state, push the arguments, and jump directly
+ to the callee function. Since this doesn't actually involve
+ executing a JSR/BSR instruction, the return address must be set
+ up by hand, either by pushing onto the stack or copying into a
+ return-address register as appropriate. Formerly this has been
+ done in PUSH_ARGUMENTS, but that's overloading its
+ functionality a bit, so I'm making it explicit to do it here. */
+ sp = PUSH_RETURN_ADDRESS (real_pc, sp);
if (STACK_ALIGN_P () && !INNER_THAN (1, 2))
{