Delete DEFAULT_LR_SAVE.
This commit is contained in:
parent
f2172603b5
commit
a88376a3e1
5 changed files with 23 additions and 9 deletions
|
@ -1,3 +1,12 @@
|
|||
2002-04-12 Kevin Buettner <kevinb@redhat.com>
|
||||
|
||||
* ppc-tdep.h (struct gdbarch_tdep): Add new member ``lr_frame_offset''.
|
||||
* rs6000-tdep.c (rs6000_frame_saved_pc): Use ``lr_frame_offset''
|
||||
from tdep struct instead of DEFAULT_LR_SAVE.
|
||||
(rs6000_gdbarch_init): Initialize ``lr_frame_offset''.
|
||||
* config/powerpc/tm-ppc-eabi.h (DEFAULT_LR_SAVE): Delete.
|
||||
* config/rs6000/tm-rs6000.h (DEFAULT_LR_SAVE): Delete.
|
||||
|
||||
2002-04-12 Michael Snyder <msnyder@redhat.com>
|
||||
|
||||
* source.c: White space fix-up.
|
||||
|
|
|
@ -28,9 +28,6 @@
|
|||
#undef SOFTWARE_SINGLE_STEP_P
|
||||
#define SOFTWARE_SINGLE_STEP_P() 0
|
||||
|
||||
#undef DEFAULT_LR_SAVE
|
||||
#define DEFAULT_LR_SAVE 4 /* eabi saves LR at 4 off of SP */
|
||||
|
||||
#undef PROCESS_LINENUMBER_HOOK
|
||||
|
||||
#undef TEXT_SEGMENT_BASE
|
||||
|
|
|
@ -93,9 +93,6 @@ extern void aix_process_linenos (void);
|
|||
prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ());
|
||||
#define INIT_FRAME_PC(fromleaf, prev) /* nothing */
|
||||
|
||||
/* Default offset from SP where the LR is stored */
|
||||
#define DEFAULT_LR_SAVE 8
|
||||
|
||||
/* Flag for machine-specific stuff in shared files. FIXME */
|
||||
#define IBM6000_TARGET
|
||||
|
||||
|
|
|
@ -67,6 +67,8 @@ struct gdbarch_tdep
|
|||
int ppc_mq_regnum; /* Multiply/Divide extension register */
|
||||
int ppc_vr0_regnum; /* First AltiVec register */
|
||||
int ppc_vrsave_regnum; /* Last AltiVec register */
|
||||
int lr_frame_offset; /* Offset to ABI specific location where
|
||||
link register is saved. */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1319,7 +1319,8 @@ rs6000_frame_saved_pc (struct frame_info *fi)
|
|||
{
|
||||
CORE_ADDR func_start;
|
||||
struct rs6000_framedata fdata;
|
||||
int wordsize = TDEP->wordsize;
|
||||
struct gdbarch_tdep *tdep = TDEP;
|
||||
int wordsize = tdep->wordsize;
|
||||
|
||||
if (fi->signal_handler_caller)
|
||||
return read_memory_addr (fi->frame + SIG_FRAME_PC_OFFSET, wordsize);
|
||||
|
@ -1342,7 +1343,7 @@ rs6000_frame_saved_pc (struct frame_info *fi)
|
|||
return read_memory_addr (fi->next->frame + SIG_FRAME_LR_OFFSET,
|
||||
wordsize);
|
||||
else
|
||||
return read_memory_addr (FRAME_CHAIN (fi) + DEFAULT_LR_SAVE,
|
||||
return read_memory_addr (FRAME_CHAIN (fi) + tdep->lr_frame_offset,
|
||||
wordsize);
|
||||
}
|
||||
|
||||
|
@ -2585,7 +2586,15 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|||
break;
|
||||
}
|
||||
|
||||
/* Calculate byte offsets in raw register array. */
|
||||
/* Set lr_frame_offset. */
|
||||
if (wordsize == 8)
|
||||
tdep->lr_frame_offset = 16;
|
||||
else if (sysv_abi)
|
||||
tdep->lr_frame_offset = 4;
|
||||
else
|
||||
tdep->lr_frame_offset = 8;
|
||||
|
||||
/* Calculate byte offsets in raw register array. */
|
||||
tdep->regoff = xmalloc (v->nregs * sizeof (int));
|
||||
for (i = off = 0; i < v->nregs; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue