From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6734 invoked by alias); 19 Nov 2002 19:55:54 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6718 invoked from network); 19 Nov 2002 19:55:49 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 19 Nov 2002 19:55:49 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 725423E39 for ; Tue, 19 Nov 2002 14:55:45 -0500 (EST) Message-ID: <3DDA9741.4050001@redhat.com> Date: Tue, 19 Nov 2002 11:55:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [patch/rfc] FRAME_FP() -> get_frame_base() Content-Type: multipart/mixed; boundary="------------040700010607000506050607" X-SW-Source: 2002-11/txt/msg00491.txt.bz2 This is a multi-part message in MIME format. --------------040700010607000506050607 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1224 Hello, Attatched is the next in "frame.h" cleanups. It replaces the macro FRAME_FP() with the function get_frame_base(). The mechanics of the change are obvious. The new function's name, though, is not. The following names come to mind: get_frame_base() Hints that the address is some how associated with the frame's base. Hopefully this conveys the notion that the address shouldn't change throughout the lifetime of the frame. get_frame_address() Like get_frame_base() but without that strong association with the frame's base. It does fit in well with the gdbarch methods frame_locals_address() and frame_args_address() though. get_frame_fp() Would associate the address with the `frame-pointer'. I don't like this one since, in the past, FP has been too closely associated to a real register, and the register definitly changes across the lifetime of the frame. Preferences? There will be several follow-on patches: - replace any occurance of frame->frame with get_frame_base(frame) - delete the identical default_frame_address(), replacing all references with get_frame_base(). - (I guess) re-vamp the PPC so that get_frame_base() is constant through out the lifetime of a frame. enjoy, Andrew --------------040700010607000506050607 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 27424 2002-11-19 Andrew Cagney * frame.h (FRAME_FP): Delete macro. (get_frame_base): New function declaration. * frame.c (get_frame_base): New function. (get_frame_id): Use ->frame. (frame_find_by_id): Rewrite to use get_frame_id. * blockframe.c: Use get_frame_base instead of FRAME_FP. * cris-tdep.c, d10v-tdep.c, findvar.c, h8500-tdep.c: Ditto. * hppa-tdep.c, i386-tdep.c, infcmd.c, infrun.c: Ditto. * m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c, mips-tdep.c: Ditto. * mn10200-tdep.c, mn10300-tdep.c, rs6000-tdep.c: Ditto. * sh-tdep.c, sparc-tdep.c, stack.c, tracepoint.c: Ditto. * v850-tdep.c, valops.c, z8k-tdep.c: Ditto. Index: blockframe.c =================================================================== RCS file: /cvs/src/src/gdb/blockframe.c,v retrieving revision 1.51 diff -u -r1.51 blockframe.c --- blockframe.c 18 Nov 2002 22:19:26 -0000 1.51 +++ blockframe.c 19 Nov 2002 19:39:41 -0000 @@ -659,7 +659,7 @@ frame = get_prev_frame (frame); if (frame == NULL) return NULL; - if (FRAME_FP (frame) == frame_addr) + if (get_frame_base (frame) == frame_addr) return frame; } } Index: cris-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/cris-tdep.c,v retrieving revision 1.27 diff -u -r1.27 cris-tdep.c --- cris-tdep.c 18 Nov 2002 22:19:26 -0000 1.27 +++ cris-tdep.c 19 Nov 2002 19:39:41 -0000 @@ -681,29 +681,29 @@ if (have_fp) { - fi->saved_regs[FP_REGNUM] = FRAME_FP (fi); + fi->saved_regs[FP_REGNUM] = get_frame_base (fi); /* Calculate the addresses. */ for (regno = regsave; regno >= 0; regno--) { - fi->saved_regs[regno] = FRAME_FP (fi) - val; + fi->saved_regs[regno] = get_frame_base (fi) - val; val -= 4; } if (fi->extra_info->leaf_function) { /* Set the register SP to contain the stack pointer of the caller. */ - fi->saved_regs[SP_REGNUM] = FRAME_FP (fi) + 4; + fi->saved_regs[SP_REGNUM] = get_frame_base (fi) + 4; } else { /* Set the register SP to contain the stack pointer of the caller. */ - fi->saved_regs[SP_REGNUM] = FRAME_FP (fi) + 8; + fi->saved_regs[SP_REGNUM] = get_frame_base (fi) + 8; /* Set the register SRP to contain the return address of the caller. */ - fi->saved_regs[SRP_REGNUM] = FRAME_FP (fi) + 4; + fi->saved_regs[SRP_REGNUM] = get_frame_base (fi) + 4; } } return ip; @@ -1260,7 +1260,7 @@ } else if (!inside_entry_file (fi->pc)) { - return read_memory_unsigned_integer (FRAME_FP (fi), 4); + return read_memory_unsigned_integer (get_frame_base (fi), 4); } else { @@ -1282,7 +1282,7 @@ CORE_ADDR cris_frame_args_address (struct frame_info *fi) { - return FRAME_FP (fi); + return get_frame_base (fi); } /* Return the address of the locals block for the frame @@ -1291,7 +1291,7 @@ CORE_ADDR cris_frame_locals_address (struct frame_info *fi) { - return FRAME_FP (fi); + return get_frame_base (fi); } /* Setup the function arguments for calling a function in the inferior. */ Index: d10v-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/d10v-tdep.c,v retrieving revision 1.55 diff -u -r1.55 d10v-tdep.c --- d10v-tdep.c 16 Nov 2002 01:00:06 -0000 1.55 +++ d10v-tdep.c 19 Nov 2002 19:39:42 -0000 @@ -547,7 +547,7 @@ int regnum; char raw_buffer[8]; - fp = FRAME_FP (fi); + fp = get_frame_base (fi); /* fill out fsr with the address of where each */ /* register was stored in the frame */ d10v_frame_init_saved_regs (fi); Index: findvar.c =================================================================== RCS file: /cvs/src/src/gdb/findvar.c,v retrieving revision 1.40 diff -u -r1.40 findvar.c --- findvar.c 13 Nov 2002 18:13:17 -0000 1.40 +++ findvar.c 19 Nov 2002 19:39:42 -0000 @@ -786,7 +786,7 @@ for some good purpose. */ { VALUE_LVAL (v) = lval_reg_frame_relative; - VALUE_FRAME (v) = FRAME_FP (frame); + VALUE_FRAME (v) = get_frame_base (frame); VALUE_FRAME_REGNUM (v) = regnum; } else if (mem_stor) Index: frame.c =================================================================== RCS file: /cvs/src/src/gdb/frame.c,v retrieving revision 1.29 diff -u -r1.29 frame.c --- frame.c 19 Nov 2002 00:46:00 -0000 1.29 +++ frame.c 19 Nov 2002 19:39:42 -0000 @@ -47,7 +47,7 @@ } else { - id->base = FRAME_FP (fi); + id->base = fi->frame; id->pc = fi->pc; } } @@ -66,19 +66,21 @@ frame != NULL; frame = get_prev_frame (frame)) { - if (INNER_THAN (FRAME_FP (frame), id.base)) + struct frame_id this; + get_frame_id (frame, &this); + if (INNER_THAN (this.base, id.base)) /* ``inner/current < frame < id.base''. Keep looking along the frame chain. */ continue; - if (INNER_THAN (id.base, FRAME_FP (frame))) + if (INNER_THAN (id.base, this.base)) /* ``inner/current < id.base < frame''. Oops, gone past it. Just give up. */ return NULL; /* FIXME: cagney/2002-04-21: This isn't sufficient. It should - use id.pc to check that the two frames belong to the same - function. Otherwise we'll do things like match dummy frames - or mis-match frameless functions. However, until someone - notices, stick with the existing behavour. */ + use id.pc / this.pc to check that the two frames belong to + the same function. Otherwise we'll do things like match + dummy frames or mis-match frameless functions. However, + until someone notices, stick with the existing behavour. */ return frame; } return NULL; @@ -818,7 +820,7 @@ /* FIXME: 2002-11-09: There isn't any reason to special case this edge condition. Instead the per-architecture code should hande it locally. */ - address = FRAME_FP (next_frame); + address = get_frame_base (next_frame); else { /* Two macros defined in tm.h specify the machine-dependent @@ -1005,6 +1007,14 @@ get_frame_pc (struct frame_info *frame) { return frame->pc; +} + +/* Per "frame.h", return the ``address'' of the frame. Code should + really be using get_frame_id(). */ +CORE_ADDR +get_frame_base (struct frame_info *fi) +{ + return fi->frame; } /* Level of the selected frame: 0 for innermost, 1 for its caller, ... Index: frame.h =================================================================== RCS file: /cvs/src/src/gdb/frame.h,v retrieving revision 1.35 diff -u -r1.35 frame.h --- frame.h 18 Nov 2002 22:19:27 -0000 1.35 +++ frame.h 19 Nov 2002 19:39:42 -0000 @@ -85,6 +85,49 @@ this frame. */ extern CORE_ADDR get_frame_pc (struct frame_info *); +/* Return the frame address from FI. Except in the machine-dependent + *FRAME* macros, a frame address has no defined meaning other than + as a magic cookie which identifies a frame over calls to the + inferior (um, SEE NOTE BELOW). The only known exception is + inferior.h (PC_IN_CALL_DUMMY) [ON_STACK]; see comments there. You + cannot assume that a frame address contains enough information to + reconstruct the frame; if you want more than just to identify the + frame (e.g. be able to fetch variables relative to that frame), + then save the whole struct frame_info (and the next struct + frame_info, since the latter is used for fetching variables on some + machines) (um, again SEE NOTE BELOW). + + NOTE: cagney/2002-11-18: Actually, the frame address isn't + sufficient for identifying a frame, and the counter examples are + wrong! + + Code that needs to (re)identify a frame must use get_frame_id() and + frame_find_by_id() (and in the future, a frame_compare() function + instead of INNER_THAN()). Two reasons: an architecture (e.g., + ia64) can have more than one frame address (due to multiple stack + pointers) (frame ID is going to be expanded to accomodate this); + successive frameless function calls can only be differientated by + comparing both the frame's base and the frame's enclosing function + (frame_find_by_id() is going to be modified to perform this test). + + The generic dummy frame version of PC_IN_CALL_DUMMY() is able to + identify a dummy frame using only the PC value. So the frame + address is not needed. In fact, most PC_IN_CALL_DUMMY() calls now + pass zero as the frame/sp values as the caller knows that those + values won't be used. Once all architectures are using generic + dummy frames, PC_IN_CALL_DUMMY() can drop the sp/frame parameters. + When it comes to finding a dummy frame, the next frame's frame ID + (with out duing an unwind) can be used (ok, could if it wasn't for + the need to change the way the PPC defined frame base in a strange + way). + + Modern architectures should be using something like dwarf2's + location expression to describe where a variable lives. Such + expressions specify their own debug info centric frame address. + Consequently, a generic frame address is pretty meaningless. */ + +extern CORE_ADDR get_frame_base (struct frame_info *); + /* Return the per-frame unique identifer. Can be used to relocate a frame after a frame cache flush (and other similar operations). */ extern void get_frame_id (struct frame_info *fi, struct frame_id *id); @@ -235,9 +278,10 @@ struct frame_info { - /* Nominal address of the frame described. See comments at FRAME_FP - about what this means outside the *FRAME* macros; in the *FRAME* - macros, it can mean whatever makes most sense for this machine. */ + /* Nominal address of the frame described. See comments at + get_frame_base() about what this means outside the *FRAME* + macros; in the *FRAME* macros, it can mean whatever makes most + sense for this machine. */ CORE_ADDR frame; /* Address at which execution is occurring in this frame. @@ -333,20 +377,6 @@ extern void *frame_obstack_alloc (unsigned long size); extern void frame_saved_regs_zalloc (struct frame_info *); - -/* Return the frame address from FI. Except in the machine-dependent - *FRAME* macros, a frame address has no defined meaning other than - as a magic cookie which identifies a frame over calls to the - inferior. The only known exception is inferior.h - (PC_IN_CALL_DUMMY) [ON_STACK]; see comments there. You cannot - assume that a frame address contains enough information to - reconstruct the frame; if you want more than just to identify the - frame (e.g. be able to fetch variables relative to that frame), - then save the whole struct frame_info (and the next struct - frame_info, since the latter is used for fetching variables on some - machines). */ - -#define FRAME_FP(fi) ((fi)->frame) /* Define a default FRAME_CHAIN_VALID, in the form that is suitable for most targets. If FRAME_CHAIN_VALID returns zero it means that the given frame Index: h8500-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/h8500-tdep.c,v retrieving revision 1.13 diff -u -r1.13 h8500-tdep.c --- h8500-tdep.c 31 Oct 2002 19:49:33 -0000 1.13 +++ h8500-tdep.c 19 Nov 2002 19:39:42 -0000 @@ -117,7 +117,7 @@ h8500_frame_chain (struct frame_info *thisframe) { if (!inside_entry_file (thisframe->pc)) - return (read_memory_integer (FRAME_FP (thisframe), PTR_SIZE)); + return (read_memory_integer (get_frame_base (thisframe), PTR_SIZE)); else return 0; } @@ -154,7 +154,7 @@ CORE_ADDR frame_saved_pc (struct frame_info *frame) { - return read_memory_integer (FRAME_FP (frame) + 2, PTR_SIZE); + return read_memory_integer (get_frame_base (frame) + 2, PTR_SIZE); } void Index: hppa-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/hppa-tdep.c,v retrieving revision 1.34 diff -u -r1.34 hppa-tdep.c --- hppa-tdep.c 18 Nov 2002 22:19:27 -0000 1.34 +++ hppa-tdep.c 19 Nov 2002 19:39:42 -0000 @@ -1532,7 +1532,7 @@ struct frame_saved_regs fsr; double freg_buffer; - fp = FRAME_FP (frame); + fp = get_frame_base (frame); get_frame_saved_regs (frame, &fsr); #ifndef NO_PC_SPACE_QUEUE_RESTORE Index: i386-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386-tdep.c,v retrieving revision 1.96 diff -u -r1.96 i386-tdep.c --- i386-tdep.c 18 Nov 2002 22:19:27 -0000 1.96 +++ i386-tdep.c 19 Nov 2002 19:39:43 -0000 @@ -860,7 +860,7 @@ int regnum; char regbuf[I386_MAX_REGISTER_SIZE]; - fp = FRAME_FP (frame); + fp = get_frame_base (frame); i386_frame_init_saved_regs (frame); for (regnum = 0; regnum < NUM_REGS; regnum++) Index: infcmd.c =================================================================== RCS file: /cvs/src/src/gdb/infcmd.c,v retrieving revision 1.62 diff -u -r1.62 infcmd.c --- infcmd.c 9 Nov 2002 12:44:23 -0000 1.62 +++ infcmd.c 19 Nov 2002 19:39:43 -0000 @@ -618,7 +618,7 @@ frame = get_current_frame (); if (!frame) /* Avoid coredump here. Why tho? */ error ("No current frame"); - step_frame_address = FRAME_FP (frame); + step_frame_address = get_frame_base (frame); step_sp = read_sp (); if (!single_inst) @@ -733,7 +733,7 @@ frame = get_current_frame (); if (!frame) /* Avoid coredump here. Why tho? */ error ("No current frame"); - step_frame_address = FRAME_FP (frame); + step_frame_address = get_frame_base (frame); step_sp = read_sp (); if (!single_inst) @@ -1096,7 +1096,7 @@ } step_over_calls = STEP_OVER_ALL; - step_frame_address = FRAME_FP (frame); + step_frame_address = get_frame_base (frame); step_sp = read_sp (); step_multi = 0; /* Only one call to proceed */ Index: infrun.c =================================================================== RCS file: /cvs/src/src/gdb/infrun.c,v retrieving revision 1.77 diff -u -r1.77 infrun.c --- infrun.c 16 Nov 2002 19:23:52 -0000 1.77 +++ infrun.c 19 Nov 2002 19:39:43 -0000 @@ -2053,7 +2053,7 @@ || trap_expected || (!CALL_DUMMY_BREAKPOINT_OFFSET_P && PC_IN_CALL_DUMMY (stop_pc, read_sp (), - FRAME_FP (get_current_frame ()))) + get_frame_base (get_current_frame ()))) || (step_range_end && step_resume_breakpoint == NULL)); else @@ -2064,7 +2064,7 @@ check here as well as above. */ || (!CALL_DUMMY_BREAKPOINT_OFFSET_P && PC_IN_CALL_DUMMY (stop_pc, read_sp (), - FRAME_FP + get_frame_base (get_current_frame ())))); if (!ecs->random_signal) @@ -2255,7 +2255,7 @@ #if 0 /* FIXME - Need to implement nested temporary breakpoints */ if (step_over_calls - && (INNER_THAN (FRAME_FP (get_current_frame ()), + && (INNER_THAN (get_frame_base (get_current_frame ()), step_frame_address))) { ecs->another_trap = 1; @@ -2466,7 +2466,7 @@ case she'd better know what she's doing. */ if (CALL_DUMMY_HAS_COMPLETED (stop_pc, read_sp (), - FRAME_FP (get_current_frame ())) + get_frame_base (get_current_frame ())) && !step_range_end) { stop_print_frame = 0; @@ -2567,7 +2567,7 @@ { - CORE_ADDR current_frame = FRAME_FP (get_current_frame ()); + CORE_ADDR current_frame = get_frame_base (get_current_frame ()); if (INNER_THAN (current_frame, step_frame_address)) { @@ -2838,7 +2838,7 @@ } step_range_start = ecs->sal.pc; step_range_end = ecs->sal.end; - step_frame_address = FRAME_FP (get_current_frame ()); + step_frame_address = get_frame_base (get_current_frame ()); ecs->current_line = ecs->sal.line; ecs->current_symtab = ecs->sal.symtab; @@ -2846,7 +2846,7 @@ of a line of the caller, continue stepping, but step_frame_address must be modified to current frame */ { - CORE_ADDR current_frame = FRAME_FP (get_current_frame ()); + CORE_ADDR current_frame = get_frame_base (get_current_frame ()); if (!(INNER_THAN (current_frame, step_frame_address))) step_frame_address = current_frame; } @@ -3353,7 +3353,7 @@ { case PRINT_UNKNOWN: if (stop_step - && step_frame_address == FRAME_FP (get_current_frame ()) + && step_frame_address == get_frame_base (get_current_frame ()) && step_start_function == find_pc_function (stop_pc)) source_flag = SRC_LINE; /* finished step, just print source line */ else Index: m68hc11-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/m68hc11-tdep.c,v retrieving revision 1.30 diff -u -r1.30 m68hc11-tdep.c --- m68hc11-tdep.c 1 Nov 2002 21:21:49 -0000 1.30 +++ m68hc11-tdep.c 19 Nov 2002 19:39:44 -0000 @@ -438,7 +438,7 @@ generic_pop_dummy_frame (); else { - fp = FRAME_FP (frame); + fp = get_frame_base (frame); FRAME_INIT_SAVED_REGS (frame); /* Copy regs from where they were saved in the frame. */ Index: m68k-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/m68k-tdep.c,v retrieving revision 1.27 diff -u -r1.27 m68k-tdep.c --- m68k-tdep.c 18 Nov 2002 22:19:28 -0000 1.27 +++ m68k-tdep.c 19 Nov 2002 19:39:44 -0000 @@ -486,7 +486,7 @@ register int regnum; char raw_buffer[12]; - fp = FRAME_FP (frame); + fp = get_frame_base (frame); m68k_frame_init_saved_regs (frame); for (regnum = FP0_REGNUM + 7; regnum >= FP0_REGNUM; regnum--) { Index: mcore-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mcore-tdep.c,v retrieving revision 1.23 diff -u -r1.23 mcore-tdep.c --- mcore-tdep.c 16 Nov 2002 01:00:06 -0000 1.23 +++ mcore-tdep.c 19 Nov 2002 19:39:44 -0000 @@ -810,7 +810,7 @@ } /* Actually cut back the stack. */ - write_register (SP_REGNUM, FRAME_FP (fi)); + write_register (SP_REGNUM, get_frame_base (fi)); } /* Finally, throw away any cached frame information. */ Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.134 diff -u -r1.134 mips-tdep.c --- mips-tdep.c 18 Nov 2002 22:19:29 -0000 1.134 +++ mips-tdep.c 19 Nov 2002 19:39:44 -0000 @@ -3813,7 +3813,7 @@ { register int regnum; struct frame_info *frame = get_current_frame (); - CORE_ADDR new_sp = FRAME_FP (frame); + CORE_ADDR new_sp = get_frame_base (frame); mips_extra_func_info_t proc_desc = frame->extra_info->proc_desc; if (USE_GENERIC_DUMMY_FRAMES Index: mn10200-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mn10200-tdep.c,v retrieving revision 1.8 diff -u -r1.8 mn10200-tdep.c --- mn10200-tdep.c 29 Jul 2002 16:34:06 -0000 1.8 +++ mn10200-tdep.c 19 Nov 2002 19:39:44 -0000 @@ -703,7 +703,7 @@ } /* Actually cut back the stack. */ - write_register (SP_REGNUM, FRAME_FP (frame)); + write_register (SP_REGNUM, get_frame_base (frame)); /* Don't we need to set the PC?!? XXX FIXME. */ } Index: mn10300-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mn10300-tdep.c,v retrieving revision 1.34 diff -u -r1.34 mn10300-tdep.c --- mn10300-tdep.c 16 Nov 2002 01:00:06 -0000 1.34 +++ mn10300-tdep.c 19 Nov 2002 19:39:45 -0000 @@ -738,7 +738,7 @@ } /* Actually cut back the stack. */ - write_register (SP_REGNUM, FRAME_FP (frame)); + write_register (SP_REGNUM, get_frame_base (frame)); /* Don't we need to set the PC?!? XXX FIXME. */ } Index: rs6000-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v retrieving revision 1.93 diff -u -r1.93 rs6000-tdep.c --- rs6000-tdep.c 18 Nov 2002 22:19:29 -0000 1.93 +++ rs6000-tdep.c 19 Nov 2002 19:39:45 -0000 @@ -956,7 +956,7 @@ int ii, wordsize; pc = read_pc (); - sp = FRAME_FP (frame); + sp = get_frame_base (frame); if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) { @@ -1761,7 +1761,7 @@ && FRAMELESS_FUNCTION_INVOCATION (thisframe)) /* A frameless function interrupted by a signal did not change the frame pointer. */ - fp = FRAME_FP (thisframe); + fp = get_frame_base (thisframe); else fp = read_memory_addr ((thisframe)->frame, wordsize); return fp; Index: sh-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sh-tdep.c,v retrieving revision 1.76 diff -u -r1.76 sh-tdep.c --- sh-tdep.c 14 Nov 2002 00:25:03 -0000 1.76 +++ sh-tdep.c 19 Nov 2002 19:39:45 -0000 @@ -930,7 +930,7 @@ if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) return frame->frame; /* dummy frame same as caller's frame */ if (frame->pc && !inside_entry_file (frame->pc)) - return read_memory_integer (FRAME_FP (frame) + frame->extra_info->f_offset, 4); + return read_memory_integer (get_frame_base (frame) + frame->extra_info->f_offset, 4); else return 0; } @@ -975,7 +975,7 @@ size = 4; else size = REGISTER_RAW_SIZE (translate_insn_rn (FP_REGNUM, media_mode)); - return read_memory_integer (FRAME_FP (frame) + frame->extra_info->f_offset, size); + return read_memory_integer (get_frame_base (frame) + frame->extra_info->f_offset, size); } else return 0; @@ -1912,7 +1912,7 @@ generic_pop_dummy_frame (); else { - fp = FRAME_FP (frame); + fp = get_frame_base (frame); FRAME_INIT_SAVED_REGS (frame); /* Copy regs from where they were saved in the frame */ @@ -1942,7 +1942,7 @@ generic_pop_dummy_frame (); else { - fp = FRAME_FP (frame); + fp = get_frame_base (frame); FRAME_INIT_SAVED_REGS (frame); /* Copy regs from where they were saved in the frame */ Index: sparc-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sparc-tdep.c,v retrieving revision 1.45 diff -u -r1.45 sparc-tdep.c --- sparc-tdep.c 18 Nov 2002 22:19:30 -0000 1.45 +++ sparc-tdep.c 19 Nov 2002 19:39:46 -0000 @@ -320,7 +320,7 @@ { /* A frameless function interrupted by a signal did not change the frame pointer, fix up frame pointer accordingly. */ - fi->frame = FRAME_FP (fi->next); + fi->frame = get_frame_base (fi->next); fi->extra_info->bottom = fi->next->extra_info->bottom; } else @@ -848,7 +848,7 @@ if (frame1->pc >= (frame1->extra_info->bottom ? frame1->extra_info->bottom : read_sp ()) - && frame1->pc <= FRAME_FP (frame1)) + && frame1->pc <= get_frame_base (frame1)) { /* Dummy frame. All but the window regs are in there somewhere. The window registers are saved on the stack, just like in a @@ -1112,7 +1112,7 @@ sparc_frame_find_saved_regs (struct frame_info *fi, CORE_ADDR *saved_regs_addr) { register int regnum; - CORE_ADDR frame_addr = FRAME_FP (fi); + CORE_ADDR frame_addr = get_frame_base (fi); if (!fi) internal_error (__FILE__, __LINE__, @@ -1122,7 +1122,7 @@ if (fi->pc >= (fi->extra_info->bottom ? fi->extra_info->bottom : read_sp ()) - && fi->pc <= FRAME_FP (fi)) + && fi->pc <= get_frame_base (fi)) { /* Dummy frame. All but the window regs are in there somewhere. */ for (regnum = G1_REGNUM; regnum < G1_REGNUM + 7; regnum++) @@ -1205,7 +1205,7 @@ } /* Otherwise, whatever we would get from ptrace(GETREGS) is accurate */ /* FIXME -- should this adjust for the sparc64 offset? */ - saved_regs_addr[SP_REGNUM] = FRAME_FP (fi); + saved_regs_addr[SP_REGNUM] = get_frame_base (fi); } /* Discard from the stack the innermost frame, restoring all saved registers. Index: stack.c =================================================================== RCS file: /cvs/src/src/gdb/stack.c,v retrieving revision 1.50 diff -u -r1.50 stack.c --- stack.c 19 Nov 2002 00:46:00 -0000 1.50 +++ stack.c 19 Nov 2002 19:39:46 -0000 @@ -1755,7 +1755,7 @@ if (selected_frame == NULL) error ("No selected frame."); thisfun = get_frame_function (selected_frame); - selected_frame_addr = FRAME_FP (selected_frame); + selected_frame_addr = get_frame_base (selected_frame); selected_frame_pc = selected_frame->pc; /* Compute the return value (if any -- possibly getting errors here). */ @@ -1817,7 +1817,7 @@ /* If we are at the end of a call dummy now, pop the dummy frame too. */ if (CALL_DUMMY_HAS_COMPLETED (read_pc(), read_sp (), - FRAME_FP (get_current_frame ()))) + get_frame_base (get_current_frame ()))) POP_FRAME; /* If interactive, print the frame that is now current. */ Index: tracepoint.c =================================================================== RCS file: /cvs/src/src/gdb/tracepoint.c,v retrieving revision 1.42 diff -u -r1.42 tracepoint.c --- tracepoint.c 2 Oct 2002 21:33:58 -0000 1.42 +++ tracepoint.c 19 Nov 2002 19:39:46 -0000 @@ -1862,7 +1862,7 @@ struct symbol *old_func; char *reply; - old_frame_addr = FRAME_FP (get_current_frame ()); + old_frame_addr = get_frame_base (get_current_frame ()); old_func = find_pc_function (read_pc ()); putpkt (msg); @@ -1948,8 +1948,8 @@ if (old_func == find_pc_function (read_pc ()) && (old_frame_addr == 0 || - FRAME_FP (get_current_frame ()) == 0 || - old_frame_addr == FRAME_FP (get_current_frame ()))) + get_frame_base (get_current_frame ()) == 0 || + old_frame_addr == get_frame_base (get_current_frame ()))) source_only = -1; else source_only = 1; Index: v850-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/v850-tdep.c,v retrieving revision 1.25 diff -u -r1.25 v850-tdep.c --- v850-tdep.c 16 Nov 2002 01:00:06 -0000 1.25 +++ v850-tdep.c 19 Nov 2002 19:39:46 -0000 @@ -895,7 +895,7 @@ read_memory_unsigned_integer (frame->saved_regs[regnum], v850_register_raw_size (regnum))); - write_register (E_SP_REGNUM, FRAME_FP (frame)); + write_register (E_SP_REGNUM, get_frame_base (frame)); } flush_cached_frames (); Index: valops.c =================================================================== RCS file: /cvs/src/src/gdb/valops.c,v retrieving revision 1.79 diff -u -r1.79 valops.c --- valops.c 7 Nov 2002 02:45:27 -0000 1.79 +++ valops.c 19 Nov 2002 19:39:47 -0000 @@ -660,7 +660,7 @@ else { for (frame = get_current_frame (); - frame && FRAME_FP (frame) != VALUE_FRAME (toval); + frame && get_frame_base (frame) != VALUE_FRAME (toval); frame = get_prev_frame (frame)) ; value_reg = VALUE_FRAME_REGNUM (toval); Index: z8k-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/z8k-tdep.c,v retrieving revision 1.12 diff -u -r1.12 z8k-tdep.c --- z8k-tdep.c 14 Nov 2002 00:25:03 -0000 1.12 +++ z8k-tdep.c 19 Nov 2002 19:39:47 -0000 @@ -249,7 +249,7 @@ pc = skip_adjust (get_pc_function_start (fip->pc), &locals); { - adr = FRAME_FP (fip) - locals; + adr = get_frame_base (fip) - locals; for (i = 0; i < 8; i++) { int word = read_memory_short (pc); --------------040700010607000506050607--