aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog12
-rw-r--r--gdb/alpha-tdep.c12
-rw-r--r--gdb/arm-tdep.c52
-rw-r--r--gdb/avr-tdep.c24
-rw-r--r--gdb/cris-tdep.c18
-rw-r--r--gdb/d10v-tdep.c22
-rw-r--r--gdb/dwarf2cfi.c2
-rw-r--r--gdb/h8300-tdep.c22
-rw-r--r--gdb/i386-tdep.c12
-rw-r--r--gdb/ia64-tdep.c22
-rw-r--r--gdb/m68hc11-tdep.c10
-rw-r--r--gdb/m68k-tdep.c8
-rw-r--r--gdb/mcore-tdep.c28
-rw-r--r--gdb/mips-tdep.c20
-rw-r--r--gdb/mn10200-tdep.c24
-rw-r--r--gdb/mn10300-tdep.c16
-rw-r--r--gdb/ns32k-tdep.c8
-rw-r--r--gdb/s390-tdep.c24
-rw-r--r--gdb/sh-tdep.c78
-rw-r--r--gdb/sparc-tdep.c30
-rw-r--r--gdb/v850-tdep.c20
-rw-r--r--gdb/vax-tdep.c2
-rw-r--r--gdb/x86-64-linux-tdep.c2
-rw-r--r--gdb/xstormy16-tdep.c20
-rw-r--r--gdb/z8k-tdep.c6
25 files changed, 253 insertions, 241 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f91a514..b5b5231 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,15 @@
+2003-01-02 Andrew Cagney <ac131313@redhat.com>
+
+ * 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.
+
2003-01-02 Mark Kettenis <kettenis@gnu.org>
* configure.in: Remove UI_OUT configuration code.
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 12dcc62..5dfe00d 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -502,7 +502,7 @@ alpha_frame_saved_pc (struct frame_info *frame)
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 @@ alpha_init_extra_frame_info (int fromleaf, struct frame_info *frame)
{
/* Use proc_desc calculated in frame_chain */
alpha_extra_func_info_t proc_desc =
- frame->next ? cached_proc_desc : find_proc_desc (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 @@ alpha_init_extra_frame_info (int fromleaf, struct frame_info *frame)
/* 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 @@ alpha_init_extra_frame_info (int fromleaf, struct frame_info *frame)
/* 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 @@ alpha_pop_frame (void)
/* we need proc_desc to know how to restore the registers;
if it is NULL, construct (a temporary) one */
if (proc_desc == NULL)
- proc_desc = find_proc_desc (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?
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 3543cc1..75c1824 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -275,7 +275,7 @@ arm_frameless_function_invocation (struct frame_info *fi)
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 @@ thumb_scan_prologue (struct frame_info *fi)
/* 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 @@ thumb_scan_prologue (struct frame_info *fi)
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 @@ check_prologue_cache (struct frame_info *fi)
{
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 @@ save_prologue_cache (struct frame_info *fi)
{
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 @@ arm_scan_prologue (struct frame_info *fi)
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 @@ arm_scan_prologue (struct frame_info *fi)
/* 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 @@ arm_scan_prologue (struct frame_info *fi)
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 @@ arm_find_callers_reg (struct frame_info *fi, int regnum)
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 @@ arm_frame_chain (struct frame_info *fi)
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 @@ arm_frame_chain (struct frame_info *fi)
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 @@ arm_frame_chain (struct frame_info *fi)
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 @@ arm_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ arm_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ arm_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ arm_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ static CORE_ADDR
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 @@ arm_pop_frame (void)
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 ();
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 1c93860..7627ee4 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -472,12 +472,12 @@ avr_scan_prologue (struct frame_info *fi)
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 @@ avr_scan_prologue (struct frame_info *fi)
/* 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 @@ avr_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ avr_init_extra_frame_info (int fromleaf, struct frame_info *fi)
/* 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 @@ avr_pop_frame (void)
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 @@ avr_pop_frame (void)
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 @@ avr_frame_address (struct frame_info *fi)
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;
}
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 0d552b8..c370ef7 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -1158,7 +1158,7 @@ cris_frame_init_saved_regs (struct frame_info *fi)
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 @@ cris_frame_init_saved_regs (struct frame_info *fi)
}
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 @@ cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ cris_pop_frame (void)
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. */
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index 14fd95a..24bb14a 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -114,10 +114,10 @@ d10v_frame_chain_valid (CORE_ADDR chain, struct frame_info *frame)
{
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 @@ d10v_extract_struct_value_address (char *regbuf)
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 @@ d10v_frame_chain (struct frame_info *fi)
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 @@ d10v_frame_init_saved_regs (struct frame_info *fi)
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 @@ d10v_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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;
}
diff --git a/gdb/dwarf2cfi.c b/gdb/dwarf2cfi.c
index 75c3c4d..22b9983 100644
--- a/gdb/dwarf2cfi.c
+++ b/gdb/dwarf2cfi.c
@@ -1784,7 +1784,7 @@ cfi_init_extra_frame_info (int fromleaf, struct frame_info *fi)
}
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);
}
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 0fc9d86..da500c6 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -470,10 +470,10 @@ h8300_frame_init_saved_regs (struct frame_info *fi)
/* 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 @@ h8300_frame_init_saved_regs (struct frame_info *fi)
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 @@ h8300_frame_chain (struct frame_info *thisframe)
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 @@ h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ h8300_frame_locals_address (struct frame_info *fi)
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 @@ h8300_pop_frame (void)
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 ();
}
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 9d50879..e7b166f 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -500,7 +500,7 @@ i386_frameless_signal_p (struct frame_info *frame)
{
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 @@ i386_frameless_signal_p (struct frame_info *frame)
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 @@ i386_sigtramp_saved_sp (struct frame_info *frame)
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 @@ i386_frame_init_saved_regs (struct frame_info *fip)
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 @@ i386_svr4_sigcontext_addr (struct frame_info *frame)
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)
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index fab210a..454fd2d 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -705,7 +705,7 @@ ia64_frame_chain (struct frame_info *frame)
{
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 @@ ia64_frame_saved_pc (struct frame_info *frame)
{
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 @@ ia64_frame_init_saved_regs (struct frame_info *frame)
{
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 @@ ia64_get_saved_register (char *raw_buffer,
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 @@ ia64_init_extra_frame_info (int fromleaf, struct frame_info *frame)
{
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 @@ ia64_init_extra_frame_info (int fromleaf, struct frame_info *frame)
}
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 @@ ia64_init_extra_frame_info (int fromleaf, struct frame_info *frame)
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);
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 7b2dc43..267951e 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -434,7 +434,7 @@ m68hc11_pop_frame (void)
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 @@ m68hc11_frame_chain (struct frame_info *frame)
{
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 @@ m68hc11_frame_init_saved_regs (struct frame_info *fi)
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 @@ m68hc11_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 8735e07..c25a825 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -258,7 +258,7 @@ m68k_frame_chain (struct frame_info *thisframe)
{
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 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info)
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 @@ m68k_frame_init_saved_regs (struct frame_info *frame_info)
}
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
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index ae2821f..890a342 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -297,7 +297,7 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
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 @@ mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue)
/* 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_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue)
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 @@ mcore_find_callers_reg (struct frame_info *fi, int regnum)
{
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 @@ CORE_ADDR
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 @@ mcore_pop_frame (void)
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 @@ void
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 @@ mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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);
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 1686ee4..c6bca3a 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -1459,7 +1459,7 @@ mips_find_saved_regs (struct frame_info *fci)
/* 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 @@ mips_find_saved_regs (struct frame_info *fci)
/* 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 @@ mips_frame_saved_pc (struct frame_info *frame)
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 @@ mips_frame_chain (struct frame_info *frame)
&& !(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 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
/* 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 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
/* 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 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
/* 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 @@ mips_pop_frame (void)
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 ();
diff --git a/gdb/mn10200-tdep.c b/gdb/mn10200-tdep.c
index fdc0941..b29befb 100644
--- a/gdb/mn10200-tdep.c
+++ b/gdb/mn10200-tdep.c
@@ -121,7 +121,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
/* 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 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
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 @@ mn10200_frame_chain (struct frame_info *fi)
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 @@ mn10200_pop_frame (struct frame_info *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
{
@@ -862,7 +862,7 @@ mn10200_frame_saved_pc (struct frame_info *fi)
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 @@ void
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;
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index e503d19..75b7932 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -159,7 +159,7 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
}
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 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
/* 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 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
{
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 @@ mn10300_frame_saved_pc (struct frame_info *fi)
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 @@ static void
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 *)
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 6e51b83..f1d084f 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -186,7 +186,7 @@ umax_frame_num_args (struct frame_info *fi)
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 @@ ns32k_frame_chain (struct frame_info *frame)
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 @@ ns32k_frame_saved_pc (struct frame_info *frame)
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 @@ ns32k_frame_init_saved_regs (struct frame_info *frame)
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;
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 964c23a..572b30b 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -773,8 +773,8 @@ s390_function_start (struct frame_info *fi)
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 @@ s390_frameless_function_invocation (struct frame_info *fi)
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 @@ void
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 @@ s390_frame_init_saved_regs (struct frame_info *fi)
{
/* 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 @@ s390_frame_saved_pc_nofix (struct frame_info *fi)
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 @@ s390_frame_chain (struct frame_info *thisframe)
{
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 @@ s390_frame_chain (struct frame_info *thisframe)
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;
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index dc68b15..6aaa15f 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -928,9 +928,9 @@ gdb_print_insn_sh (bfd_vma memaddr, disassemble_info *info)
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 @@ translate_insn_rn (int rn, int media_mode)
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 @@ static CORE_ADDR
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 @@ sh64_get_saved_pr (struct frame_info *fi, int pr_regnum)
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 @@ sh_nofp_frame_init_saved_regs (struct frame_info *fi)
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 @@ sh_nofp_frame_init_saved_regs (struct frame_info *fi)
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 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
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 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
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 @@ sh_fp_frame_init_saved_regs (struct frame_info *fi)
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 @@ sh_fp_frame_init_saved_regs (struct frame_info *fi)
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 @@ sh_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ sh_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
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 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
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 @@ sh_pop_frame (void)
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 @@ sh64_pop_frame (void)
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 @@ sh64_show_compact_regs (void)
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 @@ sh_compact_do_registers_info (int regnum, int fpregs)
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);
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 45fce0b..66e8997 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -338,7 +338,7 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
/* 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 @@ sparc_frame_saved_pc (struct frame_info *frame)
/* 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 @@ setup_arbitrary_frame (int argc, CORE_ADDR *argv)
"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 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
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 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
{
/* 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 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
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 @@ sparc_frame_find_saved_regs (struct frame_info *fi, CORE_ADDR *saved_regs_addr)
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 @@ sparc_frame_find_saved_regs (struct frame_info *fi, CORE_ADDR *saved_regs_addr)
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. */
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 6872de8..72a4ba09 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -800,8 +800,8 @@ CORE_ADDR
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 @@ v850_pop_frame (void)
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 @@ v850_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
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 @@ v850_frame_init_saved_regs (struct frame_info *fi)
/* 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 @@ v850_frame_init_saved_regs (struct frame_info *fi)
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 @@ v850_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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);
}
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 359029d..d3deda6 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -239,7 +239,7 @@ vax_frame_chain (struct frame_info *frame)
{
/* 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));
diff --git a/gdb/x86-64-linux-tdep.c b/gdb/x86-64-linux-tdep.c
index e43bdbe..02014b3 100644
--- a/gdb/x86-64-linux-tdep.c
+++ b/gdb/x86-64-linux-tdep.c
@@ -87,7 +87,7 @@ x86_64_linux_sigcontext_addr (struct frame_info *frame)
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)
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index fb7ff3c..580c0fe 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -333,7 +333,7 @@ xstormy16_pop_frame (void)
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 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
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 @@ xstormy16_frame_init_saved_regs (struct frame_info *fi)
/* 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 @@ xstormy16_frame_saved_pc (struct frame_info *fi)
{
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 @@ xstormy16_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ xstormy16_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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 @@ xstormy16_init_extra_frame_info (int fromleaf, struct frame_info *fi)
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;
diff --git a/gdb/z8k-tdep.c b/gdb/z8k-tdep.c
index e1aa8fa..be7561b 100644
--- a/gdb/z8k-tdep.c
+++ b/gdb/z8k-tdep.c
@@ -159,7 +159,7 @@ read_memory_pointer (CORE_ADDR x)
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 @@ z8k_frame_init_saved_regs (struct frame_info *frame_info)
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 @@ frame_find_saved_regs (struct frame_info *fip, struct frame_saved_regs *fsrp)
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;