From 11c02a10e2ffb85de364eb178f28209885b82231 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Wed, 8 Jan 2003 15:56:38 +0000 Subject: 2003-01-08 Andrew Cagney * alpha-tdep.c: Use get_next_frame. * arm-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto. * dwarf2cfi.c, h8300-tdep.c, i386-tdep.c, ia64-tdep.c: Ditto. * m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c: Ditto. * mips-tdep.c, mn10200-tdep.c, mn10300-tdep.c: Ditto. * ns32k-tdep.c, s390-tdep.c, sh-tdep.c, sparc-tdep.c: Ditto. * v850-tdep.c, vax-tdep.c, x86-64-linux-tdep.c: Ditto. * xstormy16-tdep.c: Ditto. --- gdb/alpha-tdep.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'gdb/alpha-tdep.c') diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 4b98514..037ae39 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -461,14 +461,14 @@ static CORE_ADDR alpha_init_frame_pc_first (int fromleaf, struct frame_info *prev) { return (fromleaf ? SAVED_PC_AFTER_CALL (get_next_frame (prev)) - : get_next_frame (prev) ? FRAME_SAVED_PC (prev->next) + : get_next_frame (prev) ? FRAME_SAVED_PC (get_next_frame (prev)) : read_pc ()); } static CORE_ADDR read_next_frame_reg (struct frame_info *fi, int regno) { - for (; fi; fi = fi->next) + for (; fi; fi = get_next_frame (fi)) { /* We have to get the saved sp from the sigcontext if it is a signal handler frame. */ @@ -513,7 +513,7 @@ alpha_saved_pc_after_call (struct frame_info *frame) if (tmp != 0) pc = tmp; - proc_desc = find_proc_desc (pc, frame->next); + proc_desc = find_proc_desc (pc, get_next_frame (frame)); pcreg = proc_desc ? PROC_PC_REG (proc_desc) : ALPHA_RA_REGNUM; if ((get_frame_type (frame) == SIGTRAMP_FRAME)) @@ -980,7 +980,9 @@ alpha_init_extra_frame_info (int fromleaf, struct frame_info *frame) { /* Use proc_desc calculated in frame_chain */ alpha_extra_func_info_t proc_desc = - frame->next ? cached_proc_desc : find_proc_desc (get_frame_pc (frame), frame->next); + get_next_frame (frame) + ? cached_proc_desc + : find_proc_desc (get_frame_pc (frame), get_next_frame (frame)); frame_extra_info_zalloc (frame, sizeof (struct frame_extra_info)); @@ -1010,9 +1012,9 @@ alpha_init_extra_frame_info (int fromleaf, struct frame_info *frame) interrupted by a signal at it's very start. */ else if (get_frame_pc (frame) == PROC_LOW_ADDR (proc_desc) && !alpha_proc_desc_is_dyn_sigtramp (proc_desc)) - deprecated_update_frame_base_hack (frame, read_next_frame_reg (frame->next, SP_REGNUM)); + deprecated_update_frame_base_hack (frame, read_next_frame_reg (get_next_frame (frame), SP_REGNUM)); else - deprecated_update_frame_base_hack (frame, read_next_frame_reg (frame->next, PROC_FRAME_REG (proc_desc)) + deprecated_update_frame_base_hack (frame, read_next_frame_reg (get_next_frame (frame), PROC_FRAME_REG (proc_desc)) + PROC_FRAME_OFFSET (proc_desc)); if (proc_desc == &temp_proc_desc) @@ -1296,7 +1298,7 @@ alpha_pop_frame (void) /* we need proc_desc to know how to restore the registers; if it is NULL, construct (a temporary) one */ if (proc_desc == NULL) - proc_desc = find_proc_desc (get_frame_pc (frame), frame->next); + proc_desc = find_proc_desc (get_frame_pc (frame), get_next_frame (frame)); /* Question: should we copy this proc_desc and save it in frame->proc_desc? If we do, who will free it? -- cgit v1.1