From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26134 invoked by alias); 2 Jan 2003 20:12:03 -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 26070 invoked from network); 2 Jan 2003 20:11:58 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by 209.249.29.67 with SMTP; 2 Jan 2003 20:11:58 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id AE6E93DE5 for ; Thu, 2 Jan 2003 20:11:46 +0000 (GMT) Message-ID: <3E149D02.5060508@redhat.com> Date: Thu, 02 Jan 2003 20:12:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [patch/obish] Use get_frame_pc() et.al. Content-Type: multipart/mixed; boundary="------------010401020500070809000302" X-SW-Source: 2003-01/txt/msg00021.txt.bz2 This is a multi-part message in MIME format. --------------010401020500070809000302 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 240 Hello, This patch goes through all the target files replacing: frame->pc with either get_frame_pc(frame) or deprecated_update_frame_pc_hack(frame, ...) I'll commit it as soon as I've managed to [re-]rebuild all the targets. Andrew --------------010401020500070809000302 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 70998 2003-01-02 Andrew Cagney * arm-tdep.c: Use get_frame_pc and deprecated_update_frame_pc_hack frame accessor methods. * alpha-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, mips-tdep.c: Ditto. * mn10200-tdep.c, mn10300-tdep.c, ns32k-tdep.c: Ditto. * s390-tdep.c, sh-tdep.c, sparc-tdep.c, v850-tdep.c: Ditto. * vax-tdep.c, x86-64-linux-tdep.c, xstormy16-tdep.c: Ditto. * z8k-tdep.c: Ditto. Index: alpha-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/alpha-tdep.c,v retrieving revision 1.48 diff -u -r1.48 alpha-tdep.c --- alpha-tdep.c 11 Dec 2002 02:26:34 -0000 1.48 +++ alpha-tdep.c 2 Jan 2003 20:05:58 -0000 @@ -502,7 +502,7 @@ static CORE_ADDR alpha_saved_pc_after_call (struct frame_info *frame) { - CORE_ADDR pc = frame->pc; + CORE_ADDR pc = get_frame_pc (frame); CORE_ADDR tmp; alpha_extra_func_info_t proc_desc; int pcreg; @@ -979,7 +979,7 @@ { /* Use proc_desc calculated in frame_chain */ alpha_extra_func_info_t proc_desc = - frame->next ? cached_proc_desc : find_proc_desc (frame->pc, frame->next); + frame->next ? cached_proc_desc : find_proc_desc (get_frame_pc (frame), frame->next); frame->extra_info = (struct frame_extra_info *) frame_obstack_alloc (sizeof (struct frame_extra_info)); @@ -1006,7 +1006,7 @@ /* This may not be quite right, if proc has a real frame register. Get the value of the frame relative sp, procedure might have been interrupted by a signal at it's very start. */ - else if (frame->pc == PROC_LOW_ADDR (proc_desc) + else if (get_frame_pc (frame) == PROC_LOW_ADDR (proc_desc) && !alpha_proc_desc_is_dyn_sigtramp (proc_desc)) frame->frame = read_next_frame_reg (frame->next, SP_REGNUM); else @@ -1024,9 +1024,9 @@ /* FIXME: cagney/2002-11-18: This problem will go away once frame.c:get_prev_frame() is modified to set the frame's type before calling functions like this. */ - find_pc_partial_function (frame->pc, &name, + find_pc_partial_function (get_frame_pc (frame), &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL); - if (!PC_IN_SIGTRAMP (frame->pc, name)) + if (!PC_IN_SIGTRAMP (get_frame_pc (frame), name)) { frame->saved_regs = (CORE_ADDR *) frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS); @@ -1295,7 +1295,7 @@ /* 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 (frame->pc, frame->next); + proc_desc = find_proc_desc (get_frame_pc (frame), frame->next); /* Question: should we copy this proc_desc and save it in frame->proc_desc? If we do, who will free it? Index: arm-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/arm-tdep.c,v retrieving revision 1.84 diff -u -r1.84 arm-tdep.c --- arm-tdep.c 21 Dec 2002 19:58:07 -0000 1.84 +++ arm-tdep.c 2 Jan 2003 20:06:00 -0000 @@ -275,7 +275,7 @@ stmdb sp!, {} sub sp, ip, #4. */ - func_start = (get_pc_function_start ((fi)->pc) + FUNCTION_START_OFFSET); + func_start = (get_pc_function_start (get_frame_pc (fi)) + FUNCTION_START_OFFSET); after_prologue = SKIP_PROLOGUE (func_start); /* There are some frameless functions whose first two instructions @@ -539,15 +539,15 @@ /* Don't try to scan dummy frames. */ if (fi != NULL - && DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0)) + && DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0)) return; - if (find_pc_partial_function (fi->pc, NULL, &prologue_start, &prologue_end)) + if (find_pc_partial_function (get_frame_pc (fi), NULL, &prologue_start, &prologue_end)) { struct symtab_and_line sal = find_pc_line (prologue_start, 0); if (sal.line == 0) /* no line info, use current PC */ - prologue_end = fi->pc; + prologue_end = get_frame_pc (fi); else if (sal.end < prologue_end) /* next line begins after fn end */ prologue_end = sal.end; /* (probably means no prologue) */ } @@ -556,7 +556,7 @@ 16 pushes, an add, and "mv fp,sp". */ prologue_end = prologue_start + 40; - prologue_end = min (prologue_end, fi->pc); + prologue_end = min (prologue_end, get_frame_pc (fi)); /* Initialize the saved register map. When register H is copied to register L, we will put H in saved_reg[L]. */ @@ -664,7 +664,7 @@ { int i; - if (fi->pc == prologue_cache.pc) + if (get_frame_pc (fi) == get_frame_pc (&prologue_cache)) { fi->extra_info->framereg = prologue_cache.extra_info->framereg; fi->extra_info->framesize = prologue_cache.extra_info->framesize; @@ -685,7 +685,7 @@ { int i; - prologue_cache.pc = fi->pc; + deprecated_update_frame_pc_hack (&prologue_cache, get_frame_pc (fi)); prologue_cache.extra_info->framereg = fi->extra_info->framereg; prologue_cache.extra_info->framesize = fi->extra_info->framesize; prologue_cache.extra_info->frameoffset = fi->extra_info->frameoffset; @@ -779,7 +779,7 @@ fi->extra_info->frameoffset = 0; /* Check for Thumb prologue. */ - if (arm_pc_is_thumb (fi->pc)) + if (arm_pc_is_thumb (get_frame_pc (fi))) { thumb_scan_prologue (fi); save_prologue_cache (fi); @@ -788,7 +788,7 @@ /* Find the function prologue. If we can't find the function in the symbol table, peek in the stack frame to find the PC. */ - if (find_pc_partial_function (fi->pc, NULL, &prologue_start, &prologue_end)) + if (find_pc_partial_function (get_frame_pc (fi), NULL, &prologue_start, &prologue_end)) { /* One way to find the end of the prologue (which works well for unoptimized code) is to do the following: @@ -796,7 +796,7 @@ struct symtab_and_line sal = find_pc_line (prologue_start, 0); if (sal.line == 0) - prologue_end = fi->pc; + prologue_end = get_frame_pc (fi); else if (sal.end < prologue_end) prologue_end = sal.end; @@ -993,9 +993,9 @@ function could be called directly. */ for (; fi; fi = fi->next) { - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0)) { - return deprecated_read_register_dummy (fi->pc, fi->frame, regnum); + return deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, regnum); } else if (fi->saved_regs[regnum] != 0) { @@ -1022,11 +1022,11 @@ CORE_ADDR caller_pc; int framereg = fi->extra_info->framereg; - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0)) /* A generic call dummy's frame is the same as caller's. */ return fi->frame; - if (fi->pc < LOWEST_PC) + if (get_frame_pc (fi) < LOWEST_PC) return 0; /* If the caller is the startup code, we're at the end of the chain. */ @@ -1038,7 +1038,7 @@ frame register number. */ /* XXX Fixme, we should try to do this without creating a temporary caller_fi. */ - if (arm_pc_is_thumb (caller_pc) != arm_pc_is_thumb (fi->pc)) + if (arm_pc_is_thumb (caller_pc) != arm_pc_is_thumb (get_frame_pc (fi))) { struct frame_info caller_fi; struct cleanup *old_chain; @@ -1054,7 +1054,7 @@ make_cleanup (xfree, caller_fi.saved_regs); /* Now, scan the prologue and obtain the frame register. */ - caller_fi.pc = caller_pc; + deprecated_update_frame_pc_hack (&caller_fi, caller_pc); arm_scan_prologue (&caller_fi); framereg = caller_fi.extra_info->framereg; @@ -1097,7 +1097,7 @@ fi->extra_info->framereg = 0; if (fi->next) - fi->pc = FRAME_SAVED_PC (fi->next); + deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next)); memset (fi->saved_regs, '\000', sizeof fi->saved_regs); @@ -1105,10 +1105,10 @@ the sigtramp and call dummy cases. */ if (!fi->next) sp = read_sp(); - else if (DEPRECATED_PC_IN_CALL_DUMMY (fi->next->pc, 0, 0)) + else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi->next), 0, 0)) /* For generic dummy frames, pull the value direct from the frame. Having an unwind function to do this would be nice. */ - sp = deprecated_read_register_dummy (fi->next->pc, fi->next->frame, + sp = deprecated_read_register_dummy (get_frame_pc (fi->next), fi->next->frame, ARM_SP_REGNUM); else sp = (fi->next->frame - fi->next->extra_info->frameoffset @@ -1132,10 +1132,10 @@ before calling functions like this. */ if (SIGCONTEXT_REGISTER_ADDRESS_P () - && ((get_frame_type (fi) == SIGTRAMP_FRAME) || PC_IN_SIGTRAMP (fi->pc, (char *)0))) + && ((get_frame_type (fi) == SIGTRAMP_FRAME) || PC_IN_SIGTRAMP (get_frame_pc (fi), (char *)0))) { for (reg = 0; reg < NUM_REGS; reg++) - fi->saved_regs[reg] = SIGCONTEXT_REGISTER_ADDRESS (sp, fi->pc, reg); + fi->saved_regs[reg] = SIGCONTEXT_REGISTER_ADDRESS (sp, get_frame_pc (fi), reg); /* FIXME: What about thumb mode? */ fi->extra_info->framereg = ARM_SP_REGNUM; @@ -1153,7 +1153,7 @@ if (!fi->next) /* This is the innermost frame? */ fi->frame = read_register (fi->extra_info->framereg); - else if (DEPRECATED_PC_IN_CALL_DUMMY (fi->next->pc, 0, 0)) + else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi->next), 0, 0)) /* Next inner most frame is a dummy, just grab its frame. Dummy frames always have the same FP as their caller. */ fi->frame = fi->next->frame; @@ -1194,10 +1194,10 @@ arm_frame_saved_pc (struct frame_info *fi) { /* If a dummy frame, pull the PC out of the frame's register buffer. */ - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0)) - return deprecated_read_register_dummy (fi->pc, fi->frame, ARM_PC_REGNUM); + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0)) + return deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, ARM_PC_REGNUM); - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame - fi->extra_info->frameoffset, + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame - fi->extra_info->frameoffset, fi->frame)) { return read_memory_integer (fi->saved_regs[ARM_PC_REGNUM], @@ -1523,7 +1523,7 @@ CORE_ADDR old_SP = (frame->frame - frame->extra_info->frameoffset + frame->extra_info->framesize); - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) { generic_pop_dummy_frame (); flush_cached_frames (); Index: avr-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/avr-tdep.c,v retrieving revision 1.14 diff -u -r1.14 avr-tdep.c --- avr-tdep.c 11 Dec 2002 02:26:34 -0000 1.14 +++ avr-tdep.c 2 Jan 2003 20:06:03 -0000 @@ -472,12 +472,12 @@ fi->extra_info->framereg = AVR_SP_REGNUM; if (find_pc_partial_function - (fi->pc, &name, &prologue_start, &prologue_end)) + (get_frame_pc (fi), &name, &prologue_start, &prologue_end)) { struct symtab_and_line sal = find_pc_line (prologue_start, 0); if (sal.line == 0) /* no line info, use current PC */ - prologue_end = fi->pc; + prologue_end = get_frame_pc (fi); else if (sal.end < prologue_end) /* next line begins after fn end */ prologue_end = sal.end; /* (probably means no prologue) */ } @@ -486,7 +486,7 @@ /* 19 pushes, an add, and "mv fp,sp" */ prologue_end = prologue_start + AVR_MAX_PROLOGUE_SIZE; - prologue_end = min (prologue_end, fi->pc); + prologue_end = min (prologue_end, get_frame_pc (fi)); /* Search the prologue looking for instructions that set up the frame pointer, adjust the stack pointer, and save registers. */ @@ -735,7 +735,7 @@ int reg; if (fi->next) - fi->pc = FRAME_SAVED_PC (fi->next); + deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next)); fi->extra_info = (struct frame_extra_info *) frame_obstack_alloc (sizeof (struct frame_extra_info)); @@ -750,11 +750,11 @@ avr_scan_prologue (fi); - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) { /* We need to setup fi->frame here because run_stack_dummy gets it wrong by assuming it's always FP. */ - fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame, + fi->frame = deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, AVR_PC_REGNUM); } else if (!fi->next) /* this is the innermost frame? */ @@ -795,7 +795,7 @@ /* TRoth: Do we want to do this if we are in main? I don't think we should since return_pc makes no sense when we are in main. */ - if ((fi->pc) && (fi->extra_info->is_main == 0)) /* We are not in CALL_DUMMY */ + if ((get_frame_pc (fi)) && (fi->extra_info->is_main == 0)) /* We are not in CALL_DUMMY */ { CORE_ADDR addr; int i; @@ -833,7 +833,7 @@ CORE_ADDR saddr; struct frame_info *frame = get_current_frame (); - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) { generic_pop_dummy_frame (); } @@ -866,8 +866,8 @@ static CORE_ADDR avr_frame_saved_pc (struct frame_info *frame) { - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) - return deprecated_read_register_dummy (frame->pc, frame->frame, + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) + return deprecated_read_register_dummy (get_frame_pc (frame), frame->frame, AVR_PC_REGNUM); else return frame->extra_info->return_pc; @@ -1031,11 +1031,11 @@ static CORE_ADDR avr_frame_chain (struct frame_info *frame) { - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) { /* initialize the return_pc now */ frame->extra_info->return_pc - = deprecated_read_register_dummy (frame->pc, frame->frame, + = deprecated_read_register_dummy (get_frame_pc (frame), frame->frame, AVR_PC_REGNUM); return frame->frame; } Index: cris-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/cris-tdep.c,v retrieving revision 1.33 diff -u -r1.33 cris-tdep.c --- cris-tdep.c 11 Dec 2002 02:26:35 -0000 1.33 +++ cris-tdep.c 2 Jan 2003 20:06:08 -0000 @@ -1158,7 +1158,7 @@ CORE_ADDR ip; struct symtab_and_line sal; int best_limit; - char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame); + char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi), fi->frame); /* Examine the entire prologue. */ register int frameless_p = 0; @@ -1178,7 +1178,7 @@ } else { - ip = get_pc_function_start (fi->pc); + ip = get_pc_function_start (get_frame_pc (fi)); sal = find_pc_line (ip, 0); /* If there is no symbol information then sal.end == 0, and we end up @@ -1204,7 +1204,7 @@ if (fi->next) { /* Called from get_prev_frame. */ - fi->pc = FRAME_SAVED_PC (fi->next); + deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next)); } fi->extra_info = (struct frame_extra_info *) @@ -1213,14 +1213,14 @@ fi->extra_info->return_pc = 0; fi->extra_info->leaf_function = 0; - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) { /* We need to setup fi->frame here because run_stack_dummy gets it wrong by assuming it's always FP. */ - fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame, + fi->frame = deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, SP_REGNUM); fi->extra_info->return_pc = - deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM); + deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, PC_REGNUM); /* FIXME: Is this necessarily true? */ fi->extra_info->leaf_function = 0; @@ -1254,11 +1254,11 @@ CORE_ADDR cris_frame_chain (struct frame_info *fi) { - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) { return fi->frame; } - else if (!inside_entry_file (fi->pc)) + else if (!inside_entry_file (get_frame_pc (fi))) { return read_memory_unsigned_integer (get_frame_base (fi), 4); } @@ -1512,7 +1512,7 @@ register int regno; register int stack_offset = 0; - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) { /* This happens when we hit a breakpoint set at the entry point, when returning from a dummy frame. */ Index: d10v-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/d10v-tdep.c,v retrieving revision 1.60 diff -u -r1.60 d10v-tdep.c --- d10v-tdep.c 11 Dec 2002 02:26:35 -0000 1.60 +++ d10v-tdep.c 2 Jan 2003 20:06:09 -0000 @@ -114,10 +114,10 @@ { if (chain != 0 && frame != NULL) { - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) return 1; /* Path back from a call dummy must be valid. */ - return ((frame)->pc > IMEM_START - && !inside_main_func (frame->pc)); + return (get_frame_pc (frame) > IMEM_START + && !inside_main_func (get_frame_pc (frame))); } else return 0; } @@ -512,8 +512,8 @@ static CORE_ADDR d10v_frame_saved_pc (struct frame_info *frame) { - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) - return d10v_make_iaddr (deprecated_read_register_dummy (frame->pc, + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) + return d10v_make_iaddr (deprecated_read_register_dummy (get_frame_pc (frame), frame->frame, PC_REGNUM)); else @@ -688,7 +688,7 @@ CORE_ADDR addr; /* A generic call dummy's frame is the same as caller's. */ - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) return fi->frame; d10v_frame_init_saved_regs (fi); @@ -805,7 +805,7 @@ memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS); next_addr = 0; - pc = get_pc_function_start (fi->pc); + pc = get_pc_function_start (get_frame_pc (fi)); uses_frame = 0; while (1) @@ -909,15 +909,15 @@ fi->extra_info->size = 0; fi->extra_info->return_pc = 0; - /* If fi->pc is zero, but this is not the outermost frame, + /* If get_frame_pc (fi) is zero, but this is not the outermost frame, then let's snatch the return_pc from the callee, so that DEPRECATED_PC_IN_CALL_DUMMY will work. */ - if (fi->pc == 0 && fi->level != 0 && fi->next != NULL) - fi->pc = d10v_frame_saved_pc (fi->next); + if (get_frame_pc (fi) == 0 && fi->level != 0 && fi->next != NULL) + deprecated_update_frame_pc_hack (fi, d10v_frame_saved_pc (fi->next)); /* The call dummy doesn't save any registers on the stack, so we can return now. */ - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) { return; } Index: dwarf2cfi.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2cfi.c,v retrieving revision 1.23 diff -u -r1.23 dwarf2cfi.c --- dwarf2cfi.c 9 Dec 2002 02:44:52 -0000 1.23 +++ dwarf2cfi.c 2 Jan 2003 20:06:11 -0000 @@ -1784,7 +1784,7 @@ } else { - UNWIND_CONTEXT (fi)->ra = fi->pc + 1; + UNWIND_CONTEXT (fi)->ra = get_frame_pc (fi) + 1; frame_state_for (UNWIND_CONTEXT (fi), fs); update_context (UNWIND_CONTEXT (fi), fs, 0); } Index: h8300-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/h8300-tdep.c,v retrieving revision 1.28 diff -u -r1.28 h8300-tdep.c --- h8300-tdep.c 11 Dec 2002 02:26:35 -0000 1.28 +++ h8300-tdep.c 2 Jan 2003 20:06:14 -0000 @@ -470,10 +470,10 @@ /* Find the beginning of this function, so we can analyze its prologue. */ - if (find_pc_partial_function (fi->pc, NULL, &func_addr, &func_end)) + if (find_pc_partial_function (get_frame_pc (fi), NULL, &func_addr, &func_end)) { struct symtab_and_line sal = find_pc_line (func_addr, 0); - CORE_ADDR limit = (sal.end && sal.end < fi->pc) ? sal.end : fi->pc; + CORE_ADDR limit = (sal.end && sal.end < get_frame_pc (fi)) ? sal.end : get_frame_pc (fi); /* This will fill in fields in fi. */ h8300_examine_prologue (func_addr, limit, fi->frame, fi->saved_regs, fi); } @@ -493,10 +493,10 @@ static CORE_ADDR h8300_frame_chain (struct frame_info *thisframe) { - if (DEPRECATED_PC_IN_CALL_DUMMY (thisframe->pc, thisframe->frame, thisframe->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (thisframe), thisframe->frame, thisframe->frame)) { /* initialize the from_pc now */ thisframe->extra_info->from_pc = - deprecated_read_register_dummy (thisframe->pc, thisframe->frame, + deprecated_read_register_dummy (get_frame_pc (thisframe), thisframe->frame, E_PC_REGNUM); return thisframe->frame; } @@ -511,8 +511,8 @@ static CORE_ADDR h8300_frame_saved_pc (struct frame_info *frame) { - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) - return deprecated_read_register_dummy (frame->pc, frame->frame, + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) + return deprecated_read_register_dummy (get_frame_pc (frame), frame->frame, E_PC_REGNUM); else return frame->extra_info->from_pc; @@ -529,10 +529,10 @@ fi->extra_info->args_pointer = 0; /* Unknown */ fi->extra_info->locals_pointer = 0; /* Unknown */ - if (!fi->pc) + if (!get_frame_pc (fi)) { if (fi->next) - fi->pc = h8300_frame_saved_pc (fi->next); + deprecated_update_frame_pc_hack (fi, h8300_frame_saved_pc (fi->next)); } h8300_frame_init_saved_regs (fi); } @@ -541,7 +541,7 @@ static CORE_ADDR h8300_frame_locals_address (struct frame_info *fi) { - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) return (CORE_ADDR) 0; /* Not sure what else to do... */ return fi->extra_info->locals_pointer; } @@ -552,7 +552,7 @@ static CORE_ADDR h8300_frame_args_address (struct frame_info *fi) { - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) return (CORE_ADDR) 0; /* Not sure what else to do... */ return fi->extra_info->args_pointer; } @@ -747,7 +747,7 @@ unsigned regno; struct frame_info *frame = get_current_frame (); - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) { generic_pop_dummy_frame (); } Index: i386-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386-tdep.c,v retrieving revision 1.104 diff -u -r1.104 i386-tdep.c --- i386-tdep.c 21 Dec 2002 19:58:07 -0000 1.104 +++ i386-tdep.c 2 Jan 2003 20:06:16 -0000 @@ -500,7 +500,7 @@ { return (frame->next && get_frame_type (frame->next) == SIGTRAMP_FRAME && (frameless_look_for_prologue (frame) - || frame->pc == get_pc_function_start (frame->pc))); + || get_frame_pc (frame) == get_pc_function_start (get_frame_pc (frame)))); } /* Return the chain-pointer for FRAME. In the case of the i386, the @@ -510,14 +510,14 @@ static CORE_ADDR i386_frame_chain (struct frame_info *frame) { - if (pc_in_dummy_frame (frame->pc)) + if (pc_in_dummy_frame (get_frame_pc (frame))) return frame->frame; if (get_frame_type (frame) == SIGTRAMP_FRAME || i386_frameless_signal_p (frame)) return frame->frame; - if (! inside_entry_file (frame->pc)) + if (! inside_entry_file (get_frame_pc (frame))) return read_memory_unsigned_integer (frame->frame, 4); return 0; @@ -567,7 +567,7 @@ static CORE_ADDR i386_frame_saved_pc (struct frame_info *frame) { - if (pc_in_dummy_frame (frame->pc)) + if (pc_in_dummy_frame (get_frame_pc (frame))) { ULONGEST pc; @@ -712,7 +712,7 @@ frame_saved_regs_zalloc (fip); - pc = get_pc_function_start (fip->pc); + pc = get_pc_function_start (get_frame_pc (fip)); if (pc != 0) locals = i386_get_frame_setup (pc); @@ -1355,7 +1355,7 @@ int sigcontext_offset = -1; char *name = NULL; - find_pc_partial_function (frame->pc, &name, NULL, NULL); + find_pc_partial_function (get_frame_pc (frame), &name, NULL, NULL); if (name) { if (strcmp (name, "_sigreturn") == 0) Index: ia64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/ia64-tdep.c,v retrieving revision 1.41 diff -u -r1.41 ia64-tdep.c --- ia64-tdep.c 11 Dec 2002 02:26:36 -0000 1.41 +++ ia64-tdep.c 2 Jan 2003 20:06:18 -0000 @@ -705,7 +705,7 @@ { if ((get_frame_type (frame) == SIGTRAMP_FRAME)) return read_sigcontext_register (frame, sp_regnum); - else if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) return frame->frame; else { @@ -722,8 +722,8 @@ { if ((get_frame_type (frame) == SIGTRAMP_FRAME)) return read_sigcontext_register (frame, pc_regnum); - else if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) - return deprecated_read_register_dummy (frame->pc, frame->frame, pc_regnum); + else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) + return deprecated_read_register_dummy (get_frame_pc (frame), frame->frame, pc_regnum); else { FRAME_INIT_SAVED_REGS (frame); @@ -1206,8 +1206,8 @@ { CORE_ADDR func_start; - func_start = get_pc_function_start (frame->pc); - examine_prologue (func_start, frame->pc, frame); + func_start = get_pc_function_start (get_frame_pc (frame)); + examine_prologue (func_start, get_frame_pc (frame), frame); } } @@ -1233,7 +1233,7 @@ if (lval != NULL) *lval = not_lval; - is_dummy_frame = DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame); + is_dummy_frame = DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame); if (regnum == SP_REGNUM && frame->next) { @@ -1481,7 +1481,7 @@ { CORE_ADDR bsp, cfm; int next_frame_is_call_dummy = ((frame->next != NULL) - && DEPRECATED_PC_IN_CALL_DUMMY (frame->next->pc, frame->next->frame, + && DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame->next), frame->next->frame, frame->next->frame)); frame->extra_info = (struct frame_extra_info *) @@ -1500,10 +1500,10 @@ } else if (next_frame_is_call_dummy) { - bsp = deprecated_read_register_dummy (frame->next->pc, + bsp = deprecated_read_register_dummy (get_frame_pc (frame->next), frame->next->frame, IA64_BSP_REGNUM); - cfm = deprecated_read_register_dummy (frame->next->pc, + cfm = deprecated_read_register_dummy (get_frame_pc (frame->next), frame->next->frame, IA64_CFM_REGNUM); } @@ -1518,9 +1518,9 @@ else if (frn->next && (get_frame_type (frn->next) == SIGTRAMP_FRAME)) cfm = read_sigcontext_register (frn->next, IA64_PFS_REGNUM); else if (frn->next - && DEPRECATED_PC_IN_CALL_DUMMY (frn->next->pc, frn->next->frame, + && DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frn->next), frn->next->frame, frn->next->frame)) - cfm = deprecated_read_register_dummy (frn->next->pc, frn->next->frame, + cfm = deprecated_read_register_dummy (get_frame_pc (frn->next), frn->next->frame, IA64_PFS_REGNUM); else cfm = read_register (IA64_PFS_REGNUM); Index: m68hc11-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/m68hc11-tdep.c,v retrieving revision 1.35 diff -u -r1.35 m68hc11-tdep.c --- m68hc11-tdep.c 11 Dec 2002 02:26:36 -0000 1.35 +++ m68hc11-tdep.c 2 Jan 2003 20:06:18 -0000 @@ -434,7 +434,7 @@ register CORE_ADDR fp, sp; register int regnum; - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) generic_pop_dummy_frame (); else { @@ -812,7 +812,7 @@ { CORE_ADDR addr; - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) return frame->frame; /* dummy frame same as caller's frame */ if (frame->extra_info->return_pc == 0 @@ -845,7 +845,7 @@ else memset (fi->saved_regs, 0, sizeof (fi->saved_regs)); - pc = fi->pc; + pc = get_frame_pc (fi); fi->extra_info->return_kind = m68hc11_get_return_insn (pc); m68hc11_guess_from_prologue (pc, fi->frame, &pc, &fi->extra_info->size, fi->saved_regs); @@ -881,13 +881,13 @@ frame_obstack_alloc (sizeof (struct frame_extra_info)); if (fi->next) - fi->pc = FRAME_SAVED_PC (fi->next); + deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next)); m68hc11_frame_init_saved_regs (fi); if (fromleaf) { - fi->extra_info->return_kind = m68hc11_get_return_insn (fi->pc); + fi->extra_info->return_kind = m68hc11_get_return_insn (get_frame_pc (fi)); fi->extra_info->return_pc = m68hc11_saved_pc_after_call (fi); } else Index: m68k-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/m68k-tdep.c,v retrieving revision 1.37 diff -u -r1.37 m68k-tdep.c --- m68k-tdep.c 11 Dec 2002 02:26:36 -0000 1.37 +++ m68k-tdep.c 2 Jan 2003 20:06:21 -0000 @@ -258,7 +258,7 @@ { if (get_frame_type (thisframe) == SIGTRAMP_FRAME) return thisframe->frame; - else if (!inside_entry_file (thisframe->pc)) + else if (!inside_entry_file (get_frame_pc (thisframe))) return read_memory_unsigned_integer (thisframe->frame, 4); else return 0; @@ -599,8 +599,8 @@ memset (frame_info->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS); - if (frame_info->pc >= possible_call_dummy_start - && frame_info->pc <= frame_info->frame) + if (get_frame_pc (frame_info) >= possible_call_dummy_start + && get_frame_pc (frame_info) <= frame_info->frame) { /* It is a call dummy. We could just stop now, since we know @@ -613,7 +613,7 @@ } else { - pc = get_pc_function_start (frame_info->pc); + pc = get_pc_function_start (get_frame_pc (frame_info)); nextinsn = read_memory_unsigned_integer (pc, 2); if (P_PEA_FP == nextinsn Index: mcore-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mcore-tdep.c,v retrieving revision 1.27 diff -u -r1.27 mcore-tdep.c --- mcore-tdep.c 11 Dec 2002 02:26:36 -0000 1.27 +++ mcore-tdep.c 2 Jan 2003 20:06:23 -0000 @@ -297,7 +297,7 @@ dummy->next = NULL; dummy->prev = NULL; - dummy->pc = pc; + deprecated_update_frame_pc_hack (dummy, pc); dummy->frame = frame; dummy->extra_info->status = 0; dummy->extra_info->framesize = 0; @@ -345,7 +345,7 @@ /* If provided, use the PC in the frame to look up the start of this function. */ - pc = (fi == NULL ? pc : fi->pc); + pc = (fi == NULL ? pc : get_frame_pc (fi)); /* Find the start of this function. */ status = find_pc_partial_function (pc, &name, &func_addr, &func_end); @@ -386,19 +386,19 @@ mcore_insn_debug (("MCORE: got jmp r15")); if (fi->next == NULL) fi->frame = read_sp (); - return fi->pc; + return get_frame_pc (fi); } /* Check for first insn of prologue */ - if (fi != NULL && fi->pc == func_addr) + if (fi != NULL && get_frame_pc (fi) == func_addr) { if (fi->next == NULL) fi->frame = read_sp (); - return fi->pc; + return get_frame_pc (fi); } /* Figure out where to stop scanning */ - stop = (fi ? fi->pc : func_end); + stop = (fi ? get_frame_pc (fi) : func_end); /* Don't walk off the end of the function */ stop = (stop > func_end ? func_end : stop); @@ -757,8 +757,8 @@ { for (; fi != NULL; fi = fi->next) { - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) - return deprecated_read_register_dummy (fi->pc, fi->frame, regnum); + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) + return deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, regnum); else if (fi->saved_regs[regnum] != 0) return read_memory_integer (fi->saved_regs[regnum], REGISTER_SIZE); @@ -773,8 +773,8 @@ mcore_frame_saved_pc (struct frame_info * fi) { - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) - return deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM); + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) + return deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, PC_REGNUM); else return mcore_find_callers_reg (fi, PR_REGNUM); } @@ -790,7 +790,7 @@ int rn; struct frame_info *fi = get_current_frame (); - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) generic_pop_dummy_frame (); else { @@ -1039,7 +1039,7 @@ mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi) { if (fi && fi->next) - fi->pc = FRAME_SAVED_PC (fi->next); + deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next)); frame_saved_regs_zalloc (fi); @@ -1048,11 +1048,11 @@ fi->extra_info->status = 0; fi->extra_info->framesize = 0; - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) { /* We need to setup fi->frame here because run_stack_dummy gets it wrong by assuming it's always FP. */ - fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame, SP_REGNUM); + fi->frame = deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, SP_REGNUM); } else mcore_analyze_prologue (fi, 0, 0); Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.148 diff -u -r1.148 mips-tdep.c --- mips-tdep.c 21 Dec 2002 06:36:02 -0000 1.148 +++ mips-tdep.c 2 Jan 2003 20:06:26 -0000 @@ -1459,7 +1459,7 @@ /* Don't bother unless we are inside a function prologue. Outside the prologue, we know where everything is. */ - && in_prologue (fci->pc, PROC_LOW_ADDR (proc_desc)) + && in_prologue (get_frame_pc (fci), PROC_LOW_ADDR (proc_desc)) /* Not sure exactly what kernel_trap means, but if it means the kernel saves the registers without a prologue doing it, @@ -1483,7 +1483,7 @@ /* Scan through this function's instructions preceding the current PC, and look for those that save registers. */ - while (addr < fci->pc) + while (addr < get_frame_pc (fci)) { inst = mips_fetch_instruction (addr); if (pc_is_mips16 (addr)) @@ -1699,7 +1699,7 @@ int pcreg = (get_frame_type (frame) == SIGTRAMP_FRAME) ? PC_REGNUM : (proc_desc ? PROC_PC_REG (proc_desc) : RA_REGNUM); - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), 0, 0)) { LONGEST tmp; frame_unwind_signed_register (frame, PC_REGNUM, &tmp); @@ -2455,7 +2455,7 @@ && !(get_frame_type (frame) == SIGTRAMP_FRAME) /* For a generic dummy frame, let get_frame_pointer() unwind a register value saved as part of the dummy frame call. */ - && !(DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0))) + && !(DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), 0, 0))) return 0; else return get_frame_pointer (frame, proc_desc); @@ -2468,7 +2468,7 @@ /* Use proc_desc calculated in frame_chain */ mips_extra_func_info_t proc_desc = - fci->next ? cached_proc_desc : find_proc_desc (fci->pc, fci->next, 1); + fci->next ? cached_proc_desc : find_proc_desc (get_frame_pc (fci), fci->next, 1); fci->extra_info = (struct frame_extra_info *) frame_obstack_alloc (sizeof (struct frame_extra_info)); @@ -2482,10 +2482,10 @@ /* This may not be quite right, if proc has a real frame register. Get the value of the frame relative sp, procedure might have been interrupted by a signal at it's very start. */ - if (fci->pc == PROC_LOW_ADDR (proc_desc) + if (get_frame_pc (fci) == PROC_LOW_ADDR (proc_desc) && !PROC_DESC_IS_DUMMY (proc_desc)) fci->frame = read_next_frame_reg (fci->next, SP_REGNUM); - else if (DEPRECATED_PC_IN_CALL_DUMMY (fci->pc, 0, 0)) + else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fci), 0, 0)) /* Do not ``fix'' fci->frame. It will have the value of the generic dummy frame's top-of-stack (since the draft fci->frame is obtained by returning the unwound stack @@ -2507,9 +2507,9 @@ /* FIXME: cagney/2002-11-18: This problem will go away once frame.c:get_prev_frame() is modified to set the frame's type before calling functions like this. */ - find_pc_partial_function (fci->pc, &name, + find_pc_partial_function (get_frame_pc (fci), &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL); - if (!PC_IN_SIGTRAMP (fci->pc, name)) + if (!PC_IN_SIGTRAMP (get_frame_pc (fci), name)) { frame_saved_regs_zalloc (fci); memcpy (fci->saved_regs, temp_saved_regs, SIZEOF_FRAME_SAVED_REGS); @@ -3815,7 +3815,7 @@ CORE_ADDR new_sp = get_frame_base (frame); mips_extra_func_info_t proc_desc = frame->extra_info->proc_desc; - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), 0, 0)) { generic_pop_dummy_frame (); flush_cached_frames (); Index: mn10200-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mn10200-tdep.c,v retrieving revision 1.10 diff -u -r1.10 mn10200-tdep.c --- mn10200-tdep.c 1 Dec 2002 19:07:15 -0000 1.10 +++ mn10200-tdep.c 2 Jan 2003 20:06:26 -0000 @@ -121,7 +121,7 @@ /* Use the PC in the frame if it's provided to look up the start of this function. */ - pc = (fi ? fi->pc : pc); + pc = (fi ? get_frame_pc (fi) : pc); /* Find the start of this function. */ status = find_pc_partial_function (pc, &name, &func_addr, &func_end); @@ -147,35 +147,35 @@ been deallocated. fi->frame is bogus, we need to fix it. */ - if (fi && fi->pc + 1 == func_end) + if (fi && get_frame_pc (fi) + 1 == func_end) { - status = target_read_memory (fi->pc, buf, 1); + status = target_read_memory (get_frame_pc (fi), buf, 1); if (status != 0) { if (fi->next == NULL) fi->frame = read_sp (); - return fi->pc; + return get_frame_pc (fi); } if (buf[0] == 0xfe) { if (fi->next == NULL) fi->frame = read_sp (); - return fi->pc; + return get_frame_pc (fi); } } /* Similarly if we're stopped on the first insn of a prologue as our frame hasn't been allocated yet. */ - if (fi && fi->pc == func_addr) + if (fi && get_frame_pc (fi) == func_addr) { if (fi->next == NULL) fi->frame = read_sp (); - return fi->pc; + return get_frame_pc (fi); } /* Figure out where to stop scanning. */ - stop = fi ? fi->pc : func_end; + stop = fi ? get_frame_pc (fi) : func_end; /* Don't walk off the end of the function. */ stop = stop > func_end ? func_end : stop; @@ -638,7 +638,7 @@ So we set up a dummy frame and call mn10200_analyze_prologue to find stuff for us. */ - dummy_frame.pc = FRAME_SAVED_PC (fi); + deprecated_update_frame_pc_hack (&dummy_frame, FRAME_SAVED_PC (fi)); dummy_frame.frame = fi->frame; memset (dummy_frame.fsr.regs, '\000', sizeof dummy_frame.fsr.regs); dummy_frame.status = 0; @@ -685,7 +685,7 @@ { int regnum; - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) generic_pop_dummy_frame (); else { @@ -862,7 +862,7 @@ registers. Most of the work is done in mn10200_analyze_prologue(). Note that when we are called for the last frame (currently active frame), - that fi->pc and fi->frame will already be setup. However, fi->frame will + that get_frame_pc (fi) and fi->frame will already be setup. However, fi->frame will be valid only if this routine uses FP. For previous frames, fi-frame will always be correct. mn10200_analyze_prologue will fix fi->frame if it's not valid. @@ -875,7 +875,7 @@ mn10200_init_extra_frame_info (struct frame_info *fi) { if (fi->next) - fi->pc = FRAME_SAVED_PC (fi->next); + deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next)); memset (fi->fsr.regs, '\000', sizeof fi->fsr.regs); fi->status = 0; Index: mn10300-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mn10300-tdep.c,v retrieving revision 1.41 diff -u -r1.41 mn10300-tdep.c --- mn10300-tdep.c 11 Dec 2002 02:26:36 -0000 1.41 +++ mn10300-tdep.c 2 Jan 2003 20:06:27 -0000 @@ -159,7 +159,7 @@ } dummy->next = NULL; dummy->prev = NULL; - dummy->pc = pc; + deprecated_update_frame_pc_hack (dummy, pc); dummy->frame = frame; dummy->extra_info->status = 0; dummy->extra_info->stack_size = 0; @@ -397,7 +397,7 @@ /* Use the PC in the frame if it's provided to look up the start of this function. */ - pc = (fi ? fi->pc : pc); + pc = (fi ? get_frame_pc (fi) : pc); /* Find the start of this function. */ status = find_pc_partial_function (pc, &name, &func_addr, &func_end); @@ -436,20 +436,20 @@ { if (fi->next == NULL) fi->frame = read_sp (); - return fi->pc; + return get_frame_pc (fi); } /* Similarly if we're stopped on the first insn of a prologue as our frame hasn't been allocated yet. */ - if (fi && fi->pc == func_addr) + if (fi && get_frame_pc (fi) == func_addr) { if (fi->next == NULL) fi->frame = read_sp (); - return fi->pc; + return get_frame_pc (fi); } /* Figure out where to stop scanning. */ - stop = fi ? fi->pc : func_end; + stop = fi ? get_frame_pc (fi) : func_end; /* Don't walk off the end of the function. */ stop = stop > func_end ? func_end : stop; @@ -883,7 +883,7 @@ registers. Most of the work is done in mn10300_analyze_prologue(). Note that when we are called for the last frame (currently active frame), - that fi->pc and fi->frame will already be setup. However, fi->frame will + that get_frame_pc (fi) and fi->frame will already be setup. However, fi->frame will be valid only if this routine uses FP. For previous frames, fi-frame will always be correct. mn10300_analyze_prologue will fix fi->frame if it's not valid. @@ -896,7 +896,7 @@ mn10300_init_extra_frame_info (int fromleaf, struct frame_info *fi) { if (fi->next) - fi->pc = FRAME_SAVED_PC (fi->next); + deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next)); frame_saved_regs_zalloc (fi); fi->extra_info = (struct frame_extra_info *) Index: ns32k-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/ns32k-tdep.c,v retrieving revision 1.25 diff -u -r1.25 ns32k-tdep.c --- ns32k-tdep.c 11 Dec 2002 02:26:36 -0000 1.25 +++ ns32k-tdep.c 2 Jan 2003 20:06:27 -0000 @@ -186,7 +186,7 @@ int width; numargs = -1; - enter_addr = ns32k_get_enter_addr ((fi)->pc); + enter_addr = ns32k_get_enter_addr (get_frame_pc (fi)); if (enter_addr > 0) { pc = ((enter_addr == 1) @@ -308,7 +308,7 @@ FP value, and that address is saved at the previous FP value as a 4-byte word. */ - if (inside_entry_file (frame->pc)) + if (inside_entry_file (get_frame_pc (frame))) return 0; return (read_memory_integer (frame->frame, 4)); @@ -351,7 +351,7 @@ static CORE_ADDR ns32k_frame_args_address (struct frame_info *frame) { - if (ns32k_get_enter_addr (frame->pc) > 1) + if (ns32k_get_enter_addr (get_frame_pc (frame)) > 1) return (frame->frame); return (read_register (SP_REGNUM) - 4); @@ -380,7 +380,7 @@ frame_saved_regs_zalloc (frame); - enter_addr = ns32k_get_enter_addr (frame->pc); + enter_addr = ns32k_get_enter_addr (get_frame_pc (frame)); if (enter_addr > 1) { regmask = read_memory_integer (enter_addr + 1, 1) & 0xff; Index: s390-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/s390-tdep.c,v retrieving revision 1.62 diff -u -r1.62 s390-tdep.c --- s390-tdep.c 11 Dec 2002 02:26:36 -0000 1.62 +++ s390-tdep.c 2 Jan 2003 20:06:27 -0000 @@ -773,8 +773,8 @@ if (fi->extra_info && fi->extra_info->initialised) function_start = fi->extra_info->function_start; - else if (fi->pc) - function_start = get_pc_function_start (fi->pc); + else if (get_frame_pc (fi)) + function_start = get_pc_function_start (get_frame_pc (fi)); return function_start; } @@ -794,7 +794,7 @@ else { fextra_info_ptr = &fextra_info; - s390_get_frame_info (s390_sniff_pc_function_start (fi->pc, fi), + s390_get_frame_info (s390_sniff_pc_function_start (get_frame_pc (fi), fi), fextra_info_ptr, fi, 1); } frameless = ((fextra_info_ptr->stack_bought == 0)); @@ -905,8 +905,8 @@ s390_init_extra_frame_info (int fromleaf, struct frame_info *fi) { fi->extra_info = frame_obstack_alloc (sizeof (struct frame_extra_info)); - if (fi->pc) - s390_get_frame_info (s390_sniff_pc_function_start (fi->pc, fi), + if (get_frame_pc (fi)) + s390_get_frame_info (s390_sniff_pc_function_start (get_frame_pc (fi), fi), fi->extra_info, fi, 1); else s390_memset_extra_info (fi->extra_info); @@ -926,12 +926,12 @@ { /* zalloc memsets the saved regs */ frame_saved_regs_zalloc (fi); - if (fi->pc) + if (get_frame_pc (fi)) { quick = (fi->extra_info && fi->extra_info->initialised && fi->extra_info->good_prologue); s390_get_frame_info (quick ? fi->extra_info->function_start : - s390_sniff_pc_function_start (fi->pc, fi), + s390_sniff_pc_function_start (get_frame_pc (fi), fi), fi->extra_info, fi, !quick); } } @@ -954,8 +954,8 @@ if (fi->extra_info && fi->extra_info->saved_pc_valid) return fi->extra_info->saved_pc; - if (deprecated_generic_find_dummy_frame (fi->pc, fi->frame)) - return deprecated_read_register_dummy (fi->pc, fi->frame, S390_PC_REGNUM); + if (deprecated_generic_find_dummy_frame (get_frame_pc (fi), fi->frame)) + return deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, S390_PC_REGNUM); s390_frame_init_saved_regs (fi); if (fi->extra_info) @@ -1008,8 +1008,8 @@ { CORE_ADDR prev_fp = 0; - if (deprecated_generic_find_dummy_frame (thisframe->pc, thisframe->frame)) - return deprecated_read_register_dummy (thisframe->pc, thisframe->frame, + if (deprecated_generic_find_dummy_frame (get_frame_pc (thisframe), thisframe->frame)) + return deprecated_read_register_dummy (get_frame_pc (thisframe), thisframe->frame, S390_SP_REGNUM); else { @@ -1018,7 +1018,7 @@ struct frame_extra_info prev_fextra_info; memset (&prev_fextra_info, 0, sizeof (prev_fextra_info)); - if (thisframe->pc) + if (get_frame_pc (thisframe)) { CORE_ADDR saved_pc, sig_pc; Index: sh-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sh-tdep.c,v retrieving revision 1.82 diff -u -r1.82 sh-tdep.c --- sh-tdep.c 11 Dec 2002 02:26:36 -0000 1.82 +++ sh-tdep.c 2 Jan 2003 20:06:29 -0000 @@ -928,9 +928,9 @@ static CORE_ADDR sh_frame_chain (struct frame_info *frame) { - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) return frame->frame; /* dummy frame same as caller's frame */ - if (frame->pc && !inside_entry_file (frame->pc)) + if (get_frame_pc (frame) && !inside_entry_file (get_frame_pc (frame))) return read_memory_integer (get_frame_base (frame) + frame->extra_info->f_offset, 4); else return 0; @@ -966,11 +966,11 @@ static CORE_ADDR sh64_frame_chain (struct frame_info *frame) { - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) return frame->frame; /* dummy frame same as caller's frame */ - if (frame->pc && !inside_entry_file (frame->pc)) + if (get_frame_pc (frame) && !inside_entry_file (get_frame_pc (frame))) { - int media_mode = pc_is_isa32 (frame->pc); + int media_mode = pc_is_isa32 (get_frame_pc (frame)); int size; if (gdbarch_tdep (current_gdbarch)->sh_abi == SH_ABI_32) size = 4; @@ -991,14 +991,14 @@ sh_find_callers_reg (struct frame_info *fi, int regnum) { for (; fi; fi = fi->next) - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) /* When the caller requests PR from the dummy frame, we return PC because that's where the previous routine appears to have done a call from. */ - return deprecated_read_register_dummy (fi->pc, fi->frame, regnum); + return deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, regnum); else { FRAME_INIT_SAVED_REGS (fi); - if (!fi->pc) + if (!get_frame_pc (fi)) return 0; if (fi->saved_regs[regnum] != 0) return read_memory_integer (fi->saved_regs[regnum], @@ -1013,17 +1013,17 @@ int media_mode = 0; for (; fi; fi = fi->next) - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) /* When the caller requests PR from the dummy frame, we return PC because that's where the previous routine appears to have done a call from. */ - return deprecated_read_register_dummy (fi->pc, fi->frame, pr_regnum); + return deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, pr_regnum); else { FRAME_INIT_SAVED_REGS (fi); - if (!fi->pc) + if (!get_frame_pc (fi)) return 0; - media_mode = pc_is_isa32 (fi->pc); + media_mode = pc_is_isa32 (get_frame_pc (fi)); if (fi->saved_regs[pr_regnum] != 0) { @@ -1053,7 +1053,7 @@ int opc; int insn; int r3_val = 0; - char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame); + char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi), fi->frame); if (fi->saved_regs == NULL) frame_saved_regs_zalloc (fi); @@ -1081,10 +1081,10 @@ that does not appear to be part of the prologue. But give up after 20 of them, since we're getting silly then. */ - pc = get_pc_function_start (fi->pc); + pc = get_pc_function_start (get_frame_pc (fi)); if (!pc) { - fi->pc = 0; + deprecated_update_frame_pc_hack (fi, 0); return; } @@ -1392,7 +1392,7 @@ int insn_size; int gdb_register_number; int register_number; - char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame); + char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi), fi->frame); struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); if (fi->saved_regs == NULL) @@ -1421,10 +1421,10 @@ that does not appear to be part of the prologue. But give up after 20 of them, since we're getting silly then. */ - pc = get_pc_function_start (fi->pc); + pc = get_pc_function_start (get_frame_pc (fi)); if (!pc) { - fi->pc = 0; + deprecated_update_frame_pc_hack (fi, 0); return; } @@ -1593,7 +1593,7 @@ int opc; int insn; int r3_val = 0; - char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame); + char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi), fi->frame); struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); if (fi->saved_regs == NULL) @@ -1622,10 +1622,10 @@ that does not appear to be part of the prologue. But give up after 20 of them, since we're getting silly then. */ - pc = get_pc_function_start (fi->pc); + pc = get_pc_function_start (get_frame_pc (fi)); if (!pc) { - fi->pc = 0; + deprecated_update_frame_pc_hack (fi, 0); return; } @@ -1724,15 +1724,15 @@ frame_obstack_alloc (sizeof (struct frame_extra_info)); if (fi->next) - fi->pc = FRAME_SAVED_PC (fi->next); + deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next)); - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) { /* We need to setup fi->frame here because run_stack_dummy gets it wrong by assuming it's always FP. */ - fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame, + fi->frame = deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, SP_REGNUM); - fi->extra_info->return_pc = deprecated_read_register_dummy (fi->pc, + fi->extra_info->return_pc = deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, PC_REGNUM); fi->extra_info->f_offset = -(CALL_DUMMY_LENGTH + 4); @@ -1750,22 +1750,22 @@ static void sh64_init_extra_frame_info (int fromleaf, struct frame_info *fi) { - int media_mode = pc_is_isa32 (fi->pc); + int media_mode = pc_is_isa32 (get_frame_pc (fi)); fi->extra_info = (struct frame_extra_info *) frame_obstack_alloc (sizeof (struct frame_extra_info)); - if (fi->next) - fi->pc = FRAME_SAVED_PC (fi->next); + if (fi->next) + deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next)); - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) { /* We need to setup fi->frame here because run_stack_dummy gets it wrong by assuming it's always FP. */ - fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame, + fi->frame = deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, SP_REGNUM); fi->extra_info->return_pc = - deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM); + deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, PC_REGNUM); fi->extra_info->f_offset = -(CALL_DUMMY_LENGTH + 4); fi->extra_info->leaf_function = 0; return; @@ -1805,7 +1805,7 @@ but we are in compact mode, it will become the corresponding compact pseudo register. If there is no corresponding compact pseudo-register what do we do?*/ - media_mode = pc_is_isa32 (frame->pc); + media_mode = pc_is_isa32 (get_frame_pc (frame)); live_regnum = translate_insn_rn (regnum, media_mode); /* Note: since the current frame's registers could only have been @@ -1815,13 +1815,13 @@ while (frame && ((frame = frame->next) != NULL)) { - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) { if (lval) /* found it in a CALL_DUMMY frame */ *lval = not_lval; if (raw_buffer) memcpy (raw_buffer, - (deprecated_generic_find_dummy_frame (frame->pc, frame->frame) + (deprecated_generic_find_dummy_frame (get_frame_pc (frame), frame->frame) + REGISTER_BYTE (regnum)), REGISTER_RAW_SIZE (regnum)); return; @@ -1909,7 +1909,7 @@ register CORE_ADDR fp; register int regnum; - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) generic_pop_dummy_frame (); else { @@ -1937,9 +1937,9 @@ register int regnum; struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); - int media_mode = pc_is_isa32 (frame->pc); + int media_mode = pc_is_isa32 (get_frame_pc (frame)); - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) generic_pop_dummy_frame (); else { @@ -2938,7 +2938,7 @@ static void sh64_show_regs (void) { - if (pc_is_isa32 (deprecated_selected_frame->pc)) + if (pc_is_isa32 (get_frame_pc (deprecated_selected_frame))) sh64_show_media_regs (); else sh64_show_compact_regs (); @@ -4113,7 +4113,7 @@ void sh64_do_registers_info (int regnum, int fpregs) { - if (pc_is_isa32 (deprecated_selected_frame->pc)) + if (pc_is_isa32 (get_frame_pc (deprecated_selected_frame))) sh_do_registers_info (regnum, fpregs); else sh_compact_do_registers_info (regnum, fpregs); Index: sparc-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sparc-tdep.c,v retrieving revision 1.53 diff -u -r1.53 sparc-tdep.c --- sparc-tdep.c 11 Dec 2002 20:35:43 -0000 1.53 +++ sparc-tdep.c 2 Jan 2003 20:06:30 -0000 @@ -338,7 +338,7 @@ frame. For such functions, the frame pointer is actually in %i7. */ fi->extra_info->flat = 0; fi->extra_info->in_prologue = 0; - if (find_pc_partial_function (fi->pc, &name, &prologue_start, &prologue_end)) + if (find_pc_partial_function (get_frame_pc (fi), &name, &prologue_start, &prologue_end)) { /* See if the function starts with an add (which will be of a negative number if a flat frame) to the sp. FIXME: Does not @@ -399,18 +399,18 @@ sal = find_pc_line (prologue_start, 0); if (sal.line == 0) /* no line info, use PC */ - prologue_end = fi->pc; + prologue_end = get_frame_pc (fi); else if (sal.end < prologue_end) prologue_end = sal.end; - if (fi->pc < prologue_end) + if (get_frame_pc (fi) < prologue_end) { - for (addr = prologue_start; addr < fi->pc; addr += 4) + for (addr = prologue_start; addr < get_frame_pc (fi); addr += 4) { insn = read_memory_integer (addr, 4); if (X_OP (insn) == 2 && X_OP3 (insn) == 0x3c) break; /* SAVE seen, stop searching */ } - if (addr >= fi->pc) + if (addr >= get_frame_pc (fi)) { fi->extra_info->in_prologue = 1; fi->frame = read_register (SP_REGNUM); @@ -422,7 +422,7 @@ { /* Kludge to cause init_prev_frame_info to destroy the new frame. */ fi->frame = fi->next->frame; - fi->pc = fi->next->pc; + deprecated_update_frame_pc_hack (fi, get_frame_pc (fi->next)); } } @@ -469,7 +469,7 @@ /* Solaris2 ucbsigvechandler passes a pointer to a sigcontext as the third parameter. The offset to the saved pc is 12. */ - find_pc_partial_function (frame->pc, &name, + find_pc_partial_function (get_frame_pc (frame), &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL); if (name && STREQ (name, "ucbsigvechandler")) saved_pc_offset = 12; @@ -535,7 +535,7 @@ "create_new_frame returned invalid frame"); frame->extra_info->bottom = argv[1]; - frame->pc = FRAME_SAVED_PC (frame); + deprecated_update_frame_pc_hack (frame, FRAME_SAVED_PC (frame)); return frame; } @@ -835,7 +835,7 @@ if (raw_buffer != NULL) { /* Put it back in target format. */ - store_address (raw_buffer, REGISTER_RAW_SIZE (regnum), frame->pc); + store_address (raw_buffer, REGISTER_RAW_SIZE (regnum), get_frame_pc (frame)); } if (addrp != NULL) *addrp = 0; @@ -846,9 +846,9 @@ { /* FIXME MVS: wrong test for dummy frame at entry. */ - if (frame1->pc >= (frame1->extra_info->bottom ? + if (get_frame_pc (frame1) >= (frame1->extra_info->bottom ? frame1->extra_info->bottom : read_sp ()) - && frame1->pc <= get_frame_base (frame1)) + && get_frame_pc (frame1) <= 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 @@ -904,7 +904,7 @@ regs = alloca (NUM_REGS * sizeof (CORE_ADDR)); memset (regs, 0, NUM_REGS * sizeof (CORE_ADDR)); - find_pc_partial_function (frame1->pc, NULL, &func_start, NULL); + find_pc_partial_function (get_frame_pc (frame1), NULL, &func_start, NULL); examine_prologue (func_start, 0, frame1, regs); addr = regs[regnum]; } @@ -1120,9 +1120,9 @@ memset (saved_regs_addr, 0, NUM_REGS * sizeof (CORE_ADDR)); - if (fi->pc >= (fi->extra_info->bottom ? + if (get_frame_pc (fi) >= (fi->extra_info->bottom ? fi->extra_info->bottom : read_sp ()) - && fi->pc <= get_frame_base (fi)) + && get_frame_pc (fi) <= get_frame_base (fi)) { /* Dummy frame. All but the window regs are in there somewhere. */ for (regnum = G1_REGNUM; regnum < G1_REGNUM + 7; regnum++) @@ -1163,7 +1163,7 @@ else if (fi->extra_info->flat) { CORE_ADDR func_start; - find_pc_partial_function (fi->pc, NULL, &func_start, NULL); + find_pc_partial_function (get_frame_pc (fi), NULL, &func_start, NULL); examine_prologue (func_start, 0, fi, saved_regs_addr); /* Flat register window frame. */ Index: v850-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/v850-tdep.c,v retrieving revision 1.30 diff -u -r1.30 v850-tdep.c --- v850-tdep.c 11 Dec 2002 02:26:36 -0000 1.30 +++ v850-tdep.c 2 Jan 2003 20:06:30 -0000 @@ -800,8 +800,8 @@ v850_find_callers_reg (struct frame_info *fi, int regnum) { for (; fi; fi = fi->next) - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) - return deprecated_read_register_dummy (fi->pc, fi->frame, regnum); + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) + return deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, regnum); else if (fi->saved_regs[regnum] != 0) return read_memory_unsigned_integer (fi->saved_regs[regnum], v850_register_raw_size (regnum)); @@ -883,7 +883,7 @@ struct frame_info *frame = get_current_frame (); int regnum; - if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) generic_pop_dummy_frame (); else { @@ -1009,8 +1009,8 @@ CORE_ADDR v850_frame_saved_pc (struct frame_info *fi) { - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) - return deprecated_read_register_dummy (fi->pc, fi->frame, E_PC_REGNUM); + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) + return deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, E_PC_REGNUM); else return v850_find_callers_reg (fi, E_RP_REGNUM); } @@ -1111,16 +1111,16 @@ /* The call dummy doesn't save any registers on the stack, so we can return now. */ - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) return; /* Find the beginning of this function, so we can analyze its prologue. */ - if (find_pc_partial_function (fi->pc, NULL, &func_addr, &func_end)) + if (find_pc_partial_function (get_frame_pc (fi), NULL, &func_addr, &func_end)) { pi.pifsrs = pifsrs; - v850_scan_prologue (fi->pc, &pi); + v850_scan_prologue (get_frame_pc (fi), &pi); if (!fi->next && pi.framereg == E_SP_REGNUM) fi->frame = read_register (pi.framereg) - pi.frameoffset; @@ -1143,7 +1143,7 @@ registers. Most of the work is done in scan_prologue(). Note that when we are called for the last frame (currently active frame), - that fi->pc and fi->frame will already be setup. However, fi->frame will + that get_frame_pc (fi) and fi->frame will already be setup. However, fi->frame will be valid only if this routine uses FP. For previous frames, fi-frame will always be correct (since that is derived from v850_frame_chain ()). @@ -1157,7 +1157,7 @@ struct prologue_info pi; if (fi->next) - fi->pc = FRAME_SAVED_PC (fi->next); + deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next)); v850_frame_init_saved_regs (fi); } Index: vax-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/vax-tdep.c,v retrieving revision 1.26 diff -u -r1.26 vax-tdep.c --- vax-tdep.c 11 Dec 2002 02:26:36 -0000 1.26 +++ vax-tdep.c 2 Jan 2003 20:06:30 -0000 @@ -239,7 +239,7 @@ { /* In the case of the VAX, the frame's nominal address is the FP value, and 12 bytes later comes the saved previous FP value as a 4-byte word. */ - if (inside_entry_file (frame->pc)) + if (inside_entry_file (get_frame_pc (frame))) return (0); return (read_memory_integer (frame->frame + 12, 4)); Index: x86-64-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/x86-64-linux-tdep.c,v retrieving revision 1.11 diff -u -r1.11 x86-64-linux-tdep.c --- x86-64-linux-tdep.c 21 Dec 2002 21:09:58 -0000 1.11 +++ x86-64-linux-tdep.c 2 Jan 2003 20:06:30 -0000 @@ -87,7 +87,7 @@ CORE_ADDR pc; ULONGEST rsp; - pc = x86_64_linux_sigtramp_start (frame->pc); + pc = x86_64_linux_sigtramp_start (get_frame_pc (frame)); if (pc) { if (frame->next) Index: xstormy16-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/xstormy16-tdep.c,v retrieving revision 1.14 diff -u -r1.14 xstormy16-tdep.c --- xstormy16-tdep.c 11 Dec 2002 02:26:36 -0000 1.14 +++ xstormy16-tdep.c 2 Jan 2003 20:06:31 -0000 @@ -333,7 +333,7 @@ if (fi == NULL) return; /* paranoia */ - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) { generic_pop_dummy_frame (); } @@ -466,7 +466,7 @@ if (fi) { /* In a call dummy, don't touch the frame. */ - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) return start_addr; /* Grab the frame-relative values of SP and FP, needed below. @@ -738,8 +738,8 @@ /* Find the beginning of this function, so we can analyze its prologue. */ - if (find_pc_partial_function (fi->pc, NULL, &func_addr, &func_end)) - xstormy16_scan_prologue (func_addr, fi->pc, fi, NULL); + if (find_pc_partial_function (get_frame_pc (fi), NULL, &func_addr, &func_end)) + xstormy16_scan_prologue (func_addr, get_frame_pc (fi), fi, NULL); /* Else we're out of luck (can't debug completely stripped code). FIXME. */ } @@ -756,9 +756,9 @@ { CORE_ADDR saved_pc; - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) { - saved_pc = deprecated_read_register_dummy (fi->pc, fi->frame, + saved_pc = deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, E_PC_REGNUM); } else @@ -791,9 +791,9 @@ or we may be in the prologue, before the FP has been set up. Unfortunately, we can't make this determination without first calling scan_prologue, and we can't do that unles we know the - fi->pc. */ + get_frame_pc (fi). */ - if (!fi->pc) + if (!get_frame_pc (fi)) { /* Sometimes we are called from get_prev_frame without the PC being set up first. Long history, don't ask. @@ -801,7 +801,7 @@ frame, so we should be able to get the saved pc from the next frame. */ if (fi->next) - fi->pc = xstormy16_frame_saved_pc (fi->next); + deprecated_update_frame_pc_hack (fi, xstormy16_frame_saved_pc (fi->next)); } /* Take care of the saved_regs right here (non-lazy). */ @@ -817,7 +817,7 @@ static CORE_ADDR xstormy16_frame_chain (struct frame_info *fi) { - if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), fi->frame, fi->frame)) { /* Call dummy's frame is the same as caller's. */ return fi->frame; Index: z8k-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/z8k-tdep.c,v retrieving revision 1.15 diff -u -r1.15 z8k-tdep.c --- z8k-tdep.c 9 Dec 2002 02:04:16 -0000 1.15 +++ z8k-tdep.c 2 Jan 2003 20:06:31 -0000 @@ -159,7 +159,7 @@ CORE_ADDR z8k_frame_chain (struct frame_info *thisframe) { - if (!inside_entry_file (thisframe->pc)) + if (!inside_entry_file (get_frame_pc (thisframe))) { return read_memory_pointer (thisframe->frame); } @@ -179,7 +179,7 @@ int w; frame_saved_regs_zalloc (frame_info); - pc = get_pc_function_start (frame_info->pc); + pc = get_pc_function_start (get_frame_pc (frame_info)); /* wander down the instruction stream */ examine_frame (pc, frame_info->saved_regs, frame_info->frame); @@ -240,7 +240,7 @@ memset (fsrp, 0, sizeof *fsrp); - pc = skip_adjust (get_pc_function_start (fip->pc), &locals); + pc = skip_adjust (get_pc_function_start (get_frame_pc (fip)), &locals); { adr = get_frame_base (fip) - locals; --------------010401020500070809000302--