2004-02-23 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Mon, 23 Feb 2004 16:27:40 +0000 (16:27 +0000)
committerAndrew Cagney <cagney@redhat.com>
Mon, 23 Feb 2004 16:27:40 +0000 (16:27 +0000)
* infcall.c (legacy_push_dummy_code): Don't call deprecated
FIX_CALL_DUMMY when push_dummy_call is available.
(call_function_by_hand, push_dummy_code): Ditto.

gdb/ChangeLog
gdb/infcall.c

index c994830eb92cadd9477b18fb8268d8acdf5956bd..7fbdc7c0d6c19e05d7571686074ee2be04b259d4 100644 (file)
@@ -1,3 +1,9 @@
+2004-02-23  Andrew Cagney  <cagney@redhat.com>
+
+       * infcall.c (legacy_push_dummy_code): Don't call deprecated
+       FIX_CALL_DUMMY when push_dummy_call is available.
+       (call_function_by_hand, push_dummy_code): Ditto.
+
 2004-02-22  Andrew Cagney  <cagney@redhat.com>
 
        * config/pa/tm-hppa.h (CALL_DUMMY_LOCATION): Delete macro.
index 860d9cfafd0693f685ab4fcf32397dc04bbd1c36..11ce018087ca8b66bad0d51a3377fba0b9705d1f 100644 (file)
@@ -275,18 +275,21 @@ legacy_push_dummy_code (struct gdbarch *gdbarch,
      DUMMY_ADDR is pretty messed up.  It comes from constant tinkering
      with the values.  Instead a DEPRECATED_FIX_CALL_DUMMY replacement
      (PUSH_DUMMY_BREAKPOINT?) should just do everything.  */
+  if (!gdbarch_push_dummy_call_p (current_gdbarch))
+    {
 #ifdef GDB_TARGET_IS_HPPA
-  (*real_pc) = DEPRECATED_FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs,
-                                         args, value_type, using_gcc);
+      (*real_pc) = DEPRECATED_FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs,
+                                             args, value_type, using_gcc);
 #else
-  if (DEPRECATED_FIX_CALL_DUMMY_P ())
-    {
-      /* gdb_assert (CALL_DUMMY_LOCATION == ON_STACK) true?  */
-      DEPRECATED_FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args,
-                                value_type, using_gcc);
-    }
-  (*real_pc) = start_sp;
+      if (DEPRECATED_FIX_CALL_DUMMY_P ())
+       {
+         /* gdb_assert (CALL_DUMMY_LOCATION == ON_STACK) true?  */
+         DEPRECATED_FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args,
+                                    value_type, using_gcc);
+       }
+      (*real_pc) = start_sp;
 #endif
+    }
   /* Yes, the offset is applied to the real_pc and not the dummy addr.
      Ulgh!  Blame the HP/UX target.  */
   (*bp_addr) = (*real_pc) + DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET;
@@ -348,7 +351,8 @@ push_dummy_code (struct gdbarch *gdbarch,
   if (gdbarch_push_dummy_code_p (gdbarch))
     return gdbarch_push_dummy_code (gdbarch, sp, funaddr, using_gcc,
                                    args, nargs, value_type, real_pc, bp_addr);
-  else if (DEPRECATED_FIX_CALL_DUMMY_P ())
+  else if (DEPRECATED_FIX_CALL_DUMMY_P ()
+          && !gdbarch_push_dummy_call_p (gdbarch))
     return legacy_push_dummy_code (gdbarch, sp, funaddr, using_gcc,
                                   args, nargs, value_type, real_pc, bp_addr);
   else    
@@ -546,7 +550,8 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
        }
       break;
     case AT_ENTRY_POINT:
-      if (DEPRECATED_FIX_CALL_DUMMY_P ())
+      if (DEPRECATED_FIX_CALL_DUMMY_P ()
+         && !gdbarch_push_dummy_call_p (current_gdbarch))
        {
          /* Sigh.  Some targets use DEPRECATED_FIX_CALL_DUMMY to
              shove extra stuff onto the stack or into registers.  That