diff options
Diffstat (limited to 'gdb/tm-rs6000.h')
-rw-r--r-- | gdb/tm-rs6000.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gdb/tm-rs6000.h b/gdb/tm-rs6000.h index 1b0ffde..5dff65c 100644 --- a/gdb/tm-rs6000.h +++ b/gdb/tm-rs6000.h @@ -36,6 +36,9 @@ extern int symtab_relocated; #define PC_LOAD_SEGMENT(PC) pc_load_segment_name(PC) +/* AIX cc seems to get this right. */ + +#define BELIEVE_PCC_PROMOTION 1 /* Conversion between a register number in stab string to actual register num. */ @@ -82,6 +85,7 @@ struct aix_framedata { int saved_fpr; /* smallest # of saved fpr */ int alloca_reg; /* alloca register number (frame ptr) */ char frameless; /* true if frameless functions. */ + char nosavedpc; /* true if pc not saved. */ }; void @@ -174,13 +178,7 @@ extern int loadinfotextindex; the new frame is not set up until the new function executes some instructions. */ -#define SAVED_PC_AFTER_CALL(frame) \ - (register_valid [LR_REGNUM] ? \ - (*(int*)®isters[REGISTER_BYTE (LR_REGNUM)]) : \ - read_register (LR_REGNUM)) - -/*#define SAVED_PC_AFTER_CALL(frame) saved_pc_after_call(frame) */ - +#define SAVED_PC_AFTER_CALL(frame) read_register (LR_REGNUM) /* Address of end of stack space. */ @@ -423,7 +421,7 @@ extern unsigned int rs6000_struct_return_address; does not, FRAMELESS is set to 1, else 0. */ #define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \ - FRAMELESS = frameless_function_invocation (FI) + FRAMELESS = frameless_function_invocation (FI, 0) /* Functions calling alloca() change the value of the stack pointer. We need to use initial stack pointer (which is saved in r31 by gcc) in @@ -436,17 +434,19 @@ extern unsigned int rs6000_struct_return_address; CORE_ADDR initial_sp; /* initial stack pointer. */ \ struct frame_saved_regs *cache_fsr; /* saved registers */ -/* Frameless function invocation in IBM RS/6000 is half-done. It perfectly - sets up a new frame, e.g. a new frame (in fact stack) pointer, etc, but it - doesn't save the %pc. In the following, even though it is considered a - frameless invocation, we still need to walk one frame up. */ +/* Frameless function invocation in IBM RS/6000 is sometimes + half-done. It perfectly sets up a new frame, e.g. a new frame (in + fact stack) pointer, etc, but it doesn't save the %pc. We call + frameless_function_invocation to tell us how to get the %pc. */ #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \ fi->initial_sp = 0; \ fi->cache_fsr = 0; -#define FRAME_SAVED_PC(FRAME) \ - read_memory_integer (read_memory_integer ((FRAME)->frame, 4)+8, 4) +#define FRAME_SAVED_PC(FRAME) \ + (frameless_function_invocation (FRAME, 1) \ + ? SAVED_PC_AFTER_CALL (FRAME) \ + : read_memory_integer (read_memory_integer ((FRAME)->frame, 4)+8, 4)) #define FRAME_ARGS_ADDRESS(FI) \ (((struct frame_info*)(FI))->initial_sp ? \ |