diff options
author | Jeff Law <law@gcc.gnu.org> | 1994-06-16 23:43:06 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1994-06-16 23:43:06 -0600 |
commit | 2e7e71216fe7f37c93ca86f84df21216adbbb904 (patch) | |
tree | b0ba88324b64ac661ef07c171182e5d202dae666 | |
parent | 51783c14289f94b543b39eedf47d99916dbf3f91 (diff) | |
download | gcc-2e7e71216fe7f37c93ca86f84df21216adbbb904.zip gcc-2e7e71216fe7f37c93ca86f84df21216adbbb904.tar.gz gcc-2e7e71216fe7f37c93ca86f84df21216adbbb904.tar.bz2 |
pa.h (DEBUGGER_AUTO_OFFSET): Define.
* pa.h (DEBUGGER_AUTO_OFFSET): Define. If no frame pointer
is available, then adjust the offset by the size of the current
frame.
From-SVN: r7509
-rw-r--r-- | gcc/config/pa/pa.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 39d21bb..f328077 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -138,6 +138,23 @@ extern int target_flags; #define ASM_STABS_OP "\t.stabs" #define ASM_STABN_OP "\t.stabn" +/* 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. + + For functions which have frame pointers this method works fine; + the (frame pointer) == (stack pointer at function entry) and GCC provides + an offset relative to the frame pointer. + + This loses for functions without a frame pointer; GCC provides an offset + which is relative to the stack pointer after adjusting for the function's + frame size. GDB would prefer the offset to be relative to the value of + the stack pointer at the function's entry. Yuk! */ +#define DEBUGGER_AUTO_OFFSET(X) \ + ((GET_CODE (X) == PLUS ? INTVAL (XEXP (X, 1)) : 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}" |