pa.h (DEBUGGER_ARG_OFFSET): Define.
authorJeff Law <law@gcc.gnu.org>
Mon, 11 Jul 1994 20:45:30 +0000 (14:45 -0600)
committerJeff Law <law@gcc.gnu.org>
Mon, 11 Jul 1994 20:45:30 +0000 (14:45 -0600)
        * pa.h (DEBUGGER_ARG_OFFSET): Define.  If no frame pointer
        is available, then adjust the offset by the size of the
        current frame.

From-SVN: r7713

gcc/config/pa/pa.h

index f328077..2991f4f 100644 (file)
@@ -140,8 +140,8 @@ extern int target_flags;
 
 /* GDB always assumes the current function's frame begins at the value
    of the stack pointer upon entry to the current function.  Accessing
-   local variables is done using the base of the frame + an offset
-   provided by GCC.
+   local variables and parameters passed on the stack is done using the
+   base of the frame + an offset provided by GCC.
 
    For functions which have frame pointers this method works fine;
    the (frame pointer) == (stack pointer at function entry) and GCC provides
@@ -155,6 +155,10 @@ extern int target_flags;
   ((GET_CODE (X) == PLUS ? INTVAL (XEXP (X, 1)) : 0) \
     + (frame_pointer_needed ? 0 : compute_frame_size (get_frame_size (), 0)))
 
+#define DEBUGGER_ARG_OFFSET(OFFSET, X) \
+  ((GET_CODE (X) == PLUS ? OFFSET : 0) \
+    + (frame_pointer_needed ? 0 : compute_frame_size (get_frame_size (), 0)))
+
 #if (TARGET_DEFAULT & 1) == 0
 #define CPP_SPEC "%{msnake:-D__hp9000s700 -D_PA_RISC1_1}\
  %{mpa-risc-1-1:-D__hp9000s700 -D_PA_RISC1_1}"