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.
This commit is contained in:
parent
440cc0bc1a
commit
50abf9e57b
25 changed files with 253 additions and 241 deletions
|
@ -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>
|
2003-01-02 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
* configure.in: Remove UI_OUT configuration code.
|
* configure.in: Remove UI_OUT configuration code.
|
||||||
|
|
|
@ -502,7 +502,7 @@ alpha_frame_saved_pc (struct frame_info *frame)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
alpha_saved_pc_after_call (struct frame_info *frame)
|
alpha_saved_pc_after_call (struct frame_info *frame)
|
||||||
{
|
{
|
||||||
CORE_ADDR pc = frame->pc;
|
CORE_ADDR pc = get_frame_pc (frame);
|
||||||
CORE_ADDR tmp;
|
CORE_ADDR tmp;
|
||||||
alpha_extra_func_info_t proc_desc;
|
alpha_extra_func_info_t proc_desc;
|
||||||
int pcreg;
|
int pcreg;
|
||||||
|
@ -979,7 +979,7 @@ alpha_init_extra_frame_info (int fromleaf, struct frame_info *frame)
|
||||||
{
|
{
|
||||||
/* Use proc_desc calculated in frame_chain */
|
/* Use proc_desc calculated in frame_chain */
|
||||||
alpha_extra_func_info_t proc_desc =
|
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->extra_info = (struct frame_extra_info *)
|
||||||
frame_obstack_alloc (sizeof (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.
|
/* 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
|
Get the value of the frame relative sp, procedure might have been
|
||||||
interrupted by a signal at it's very start. */
|
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))
|
&& !alpha_proc_desc_is_dyn_sigtramp (proc_desc))
|
||||||
frame->frame = read_next_frame_reg (frame->next, SP_REGNUM);
|
frame->frame = read_next_frame_reg (frame->next, SP_REGNUM);
|
||||||
else
|
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
|
/* FIXME: cagney/2002-11-18: This problem will go away once
|
||||||
frame.c:get_prev_frame() is modified to set the frame's
|
frame.c:get_prev_frame() is modified to set the frame's
|
||||||
type before calling functions like this. */
|
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);
|
(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->saved_regs = (CORE_ADDR *)
|
||||||
frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
|
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;
|
/* we need proc_desc to know how to restore the registers;
|
||||||
if it is NULL, construct (a temporary) one */
|
if it is NULL, construct (a temporary) one */
|
||||||
if (proc_desc == NULL)
|
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
|
/* Question: should we copy this proc_desc and save it in
|
||||||
frame->proc_desc? If we do, who will free it?
|
frame->proc_desc? If we do, who will free it?
|
||||||
|
|
|
@ -275,7 +275,7 @@ arm_frameless_function_invocation (struct frame_info *fi)
|
||||||
stmdb sp!, {}
|
stmdb sp!, {}
|
||||||
sub sp, ip, #4. */
|
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);
|
after_prologue = SKIP_PROLOGUE (func_start);
|
||||||
|
|
||||||
/* There are some frameless functions whose first two instructions
|
/* 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. */
|
/* Don't try to scan dummy frames. */
|
||||||
if (fi != NULL
|
if (fi != NULL
|
||||||
&& DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, 0, 0))
|
&& DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
|
||||||
return;
|
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);
|
struct symtab_and_line sal = find_pc_line (prologue_start, 0);
|
||||||
|
|
||||||
if (sal.line == 0) /* no line info, use current PC */
|
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 */
|
else if (sal.end < prologue_end) /* next line begins after fn end */
|
||||||
prologue_end = sal.end; /* (probably means no prologue) */
|
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". */
|
16 pushes, an add, and "mv fp,sp". */
|
||||||
prologue_end = prologue_start + 40;
|
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
|
/* Initialize the saved register map. When register H is copied to
|
||||||
register L, we will put H in saved_reg[L]. */
|
register L, we will put H in saved_reg[L]. */
|
||||||
|
@ -664,7 +664,7 @@ check_prologue_cache (struct frame_info *fi)
|
||||||
{
|
{
|
||||||
int i;
|
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->framereg = prologue_cache.extra_info->framereg;
|
||||||
fi->extra_info->framesize = prologue_cache.extra_info->framesize;
|
fi->extra_info->framesize = prologue_cache.extra_info->framesize;
|
||||||
|
@ -685,7 +685,7 @@ save_prologue_cache (struct frame_info *fi)
|
||||||
{
|
{
|
||||||
int i;
|
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->framereg = fi->extra_info->framereg;
|
||||||
prologue_cache.extra_info->framesize = fi->extra_info->framesize;
|
prologue_cache.extra_info->framesize = fi->extra_info->framesize;
|
||||||
prologue_cache.extra_info->frameoffset = fi->extra_info->frameoffset;
|
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;
|
fi->extra_info->frameoffset = 0;
|
||||||
|
|
||||||
/* Check for Thumb prologue. */
|
/* Check for Thumb prologue. */
|
||||||
if (arm_pc_is_thumb (fi->pc))
|
if (arm_pc_is_thumb (get_frame_pc (fi)))
|
||||||
{
|
{
|
||||||
thumb_scan_prologue (fi);
|
thumb_scan_prologue (fi);
|
||||||
save_prologue_cache (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
|
/* Find the function prologue. If we can't find the function in
|
||||||
the symbol table, peek in the stack frame to find the PC. */
|
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
|
/* One way to find the end of the prologue (which works well
|
||||||
for unoptimized code) is to do the following:
|
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);
|
struct symtab_and_line sal = find_pc_line (prologue_start, 0);
|
||||||
|
|
||||||
if (sal.line == 0)
|
if (sal.line == 0)
|
||||||
prologue_end = fi->pc;
|
prologue_end = get_frame_pc (fi);
|
||||||
else if (sal.end < prologue_end)
|
else if (sal.end < prologue_end)
|
||||||
prologue_end = sal.end;
|
prologue_end = sal.end;
|
||||||
|
|
||||||
|
@ -993,9 +993,9 @@ arm_find_callers_reg (struct frame_info *fi, int regnum)
|
||||||
function could be called directly. */
|
function could be called directly. */
|
||||||
for (; fi; fi = fi->next)
|
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)
|
else if (fi->saved_regs[regnum] != 0)
|
||||||
{
|
{
|
||||||
|
@ -1022,11 +1022,11 @@ arm_frame_chain (struct frame_info *fi)
|
||||||
CORE_ADDR caller_pc;
|
CORE_ADDR caller_pc;
|
||||||
int framereg = fi->extra_info->framereg;
|
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. */
|
/* A generic call dummy's frame is the same as caller's. */
|
||||||
return fi->frame;
|
return fi->frame;
|
||||||
|
|
||||||
if (fi->pc < LOWEST_PC)
|
if (get_frame_pc (fi) < LOWEST_PC)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* If the caller is the startup code, we're at the end of the chain. */
|
/* 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. */
|
frame register number. */
|
||||||
/* XXX Fixme, we should try to do this without creating a temporary
|
/* XXX Fixme, we should try to do this without creating a temporary
|
||||||
caller_fi. */
|
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 frame_info caller_fi;
|
||||||
struct cleanup *old_chain;
|
struct cleanup *old_chain;
|
||||||
|
@ -1054,7 +1054,7 @@ arm_frame_chain (struct frame_info *fi)
|
||||||
make_cleanup (xfree, caller_fi.saved_regs);
|
make_cleanup (xfree, caller_fi.saved_regs);
|
||||||
|
|
||||||
/* Now, scan the prologue and obtain the frame register. */
|
/* 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);
|
arm_scan_prologue (&caller_fi);
|
||||||
framereg = caller_fi.extra_info->framereg;
|
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;
|
fi->extra_info->framereg = 0;
|
||||||
|
|
||||||
if (fi->next)
|
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);
|
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. */
|
the sigtramp and call dummy cases. */
|
||||||
if (!fi->next)
|
if (!fi->next)
|
||||||
sp = read_sp();
|
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.
|
/* For generic dummy frames, pull the value direct from the frame.
|
||||||
Having an unwind function to do this would be nice. */
|
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);
|
ARM_SP_REGNUM);
|
||||||
else
|
else
|
||||||
sp = (fi->next->frame - fi->next->extra_info->frameoffset
|
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. */
|
before calling functions like this. */
|
||||||
|
|
||||||
if (SIGCONTEXT_REGISTER_ADDRESS_P ()
|
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++)
|
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? */
|
/* FIXME: What about thumb mode? */
|
||||||
fi->extra_info->framereg = ARM_SP_REGNUM;
|
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)
|
if (!fi->next)
|
||||||
/* This is the innermost frame? */
|
/* This is the innermost frame? */
|
||||||
fi->frame = read_register (fi->extra_info->framereg);
|
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.
|
/* Next inner most frame is a dummy, just grab its frame.
|
||||||
Dummy frames always have the same FP as their caller. */
|
Dummy frames always have the same FP as their caller. */
|
||||||
fi->frame = fi->next->frame;
|
fi->frame = fi->next->frame;
|
||||||
|
@ -1194,10 +1194,10 @@ static CORE_ADDR
|
||||||
arm_frame_saved_pc (struct frame_info *fi)
|
arm_frame_saved_pc (struct frame_info *fi)
|
||||||
{
|
{
|
||||||
/* If a dummy frame, pull the PC out of the frame's register buffer. */
|
/* If a dummy frame, pull the PC out of the frame's register buffer. */
|
||||||
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, ARM_PC_REGNUM);
|
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))
|
fi->frame))
|
||||||
{
|
{
|
||||||
return read_memory_integer (fi->saved_regs[ARM_PC_REGNUM],
|
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
|
CORE_ADDR old_SP = (frame->frame - frame->extra_info->frameoffset
|
||||||
+ frame->extra_info->framesize);
|
+ 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 ();
|
generic_pop_dummy_frame ();
|
||||||
flush_cached_frames ();
|
flush_cached_frames ();
|
||||||
|
|
|
@ -472,12 +472,12 @@ avr_scan_prologue (struct frame_info *fi)
|
||||||
fi->extra_info->framereg = AVR_SP_REGNUM;
|
fi->extra_info->framereg = AVR_SP_REGNUM;
|
||||||
|
|
||||||
if (find_pc_partial_function
|
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);
|
struct symtab_and_line sal = find_pc_line (prologue_start, 0);
|
||||||
|
|
||||||
if (sal.line == 0) /* no line info, use current PC */
|
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 */
|
else if (sal.end < prologue_end) /* next line begins after fn end */
|
||||||
prologue_end = sal.end; /* (probably means no prologue) */
|
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" */
|
/* 19 pushes, an add, and "mv fp,sp" */
|
||||||
prologue_end = prologue_start + AVR_MAX_PROLOGUE_SIZE;
|
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
|
/* Search the prologue looking for instructions that set up the
|
||||||
frame pointer, adjust the stack pointer, and save registers. */
|
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;
|
int reg;
|
||||||
|
|
||||||
if (fi->next)
|
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 *)
|
fi->extra_info = (struct frame_extra_info *)
|
||||||
frame_obstack_alloc (sizeof (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);
|
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
|
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
|
||||||
by assuming it's always FP. */
|
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);
|
AVR_PC_REGNUM);
|
||||||
}
|
}
|
||||||
else if (!fi->next) /* this is the innermost frame? */
|
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
|
/* 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. */
|
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;
|
CORE_ADDR addr;
|
||||||
int i;
|
int i;
|
||||||
|
@ -833,7 +833,7 @@ avr_pop_frame (void)
|
||||||
CORE_ADDR saddr;
|
CORE_ADDR saddr;
|
||||||
struct frame_info *frame = get_current_frame ();
|
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 ();
|
generic_pop_dummy_frame ();
|
||||||
}
|
}
|
||||||
|
@ -866,8 +866,8 @@ avr_pop_frame (void)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
avr_frame_saved_pc (struct frame_info *frame)
|
avr_frame_saved_pc (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 deprecated_read_register_dummy (frame->pc, frame->frame,
|
return deprecated_read_register_dummy (get_frame_pc (frame), frame->frame,
|
||||||
AVR_PC_REGNUM);
|
AVR_PC_REGNUM);
|
||||||
else
|
else
|
||||||
return frame->extra_info->return_pc;
|
return frame->extra_info->return_pc;
|
||||||
|
@ -1031,11 +1031,11 @@ avr_frame_address (struct frame_info *fi)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
avr_frame_chain (struct frame_info *frame)
|
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 */
|
/* initialize the return_pc now */
|
||||||
frame->extra_info->return_pc
|
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);
|
AVR_PC_REGNUM);
|
||||||
return frame->frame;
|
return frame->frame;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1158,7 +1158,7 @@ cris_frame_init_saved_regs (struct frame_info *fi)
|
||||||
CORE_ADDR ip;
|
CORE_ADDR ip;
|
||||||
struct symtab_and_line sal;
|
struct symtab_and_line sal;
|
||||||
int best_limit;
|
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. */
|
/* Examine the entire prologue. */
|
||||||
register int frameless_p = 0;
|
register int frameless_p = 0;
|
||||||
|
@ -1178,7 +1178,7 @@ cris_frame_init_saved_regs (struct frame_info *fi)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ip = get_pc_function_start (fi->pc);
|
ip = get_pc_function_start (get_frame_pc (fi));
|
||||||
sal = find_pc_line (ip, 0);
|
sal = find_pc_line (ip, 0);
|
||||||
|
|
||||||
/* If there is no symbol information then sal.end == 0, and we end up
|
/* 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)
|
if (fi->next)
|
||||||
{
|
{
|
||||||
/* Called from get_prev_frame. */
|
/* 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 *)
|
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->return_pc = 0;
|
||||||
fi->extra_info->leaf_function = 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
|
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
|
||||||
by assuming it's always FP. */
|
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);
|
SP_REGNUM);
|
||||||
fi->extra_info->return_pc =
|
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? */
|
/* FIXME: Is this necessarily true? */
|
||||||
fi->extra_info->leaf_function = 0;
|
fi->extra_info->leaf_function = 0;
|
||||||
|
@ -1254,11 +1254,11 @@ cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||||
CORE_ADDR
|
CORE_ADDR
|
||||||
cris_frame_chain (struct frame_info *fi)
|
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;
|
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);
|
return read_memory_unsigned_integer (get_frame_base (fi), 4);
|
||||||
}
|
}
|
||||||
|
@ -1512,7 +1512,7 @@ cris_pop_frame (void)
|
||||||
register int regno;
|
register int regno;
|
||||||
register int stack_offset = 0;
|
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,
|
/* This happens when we hit a breakpoint set at the entry point,
|
||||||
when returning from a dummy frame. */
|
when returning from a dummy frame. */
|
||||||
|
|
|
@ -114,10 +114,10 @@ d10v_frame_chain_valid (CORE_ADDR chain, struct frame_info *frame)
|
||||||
{
|
{
|
||||||
if (chain != 0 && frame != NULL)
|
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 1; /* Path back from a call dummy must be valid. */
|
||||||
return ((frame)->pc > IMEM_START
|
return (get_frame_pc (frame) > IMEM_START
|
||||||
&& !inside_main_func (frame->pc));
|
&& !inside_main_func (get_frame_pc (frame)));
|
||||||
}
|
}
|
||||||
else return 0;
|
else return 0;
|
||||||
}
|
}
|
||||||
|
@ -512,8 +512,8 @@ d10v_extract_struct_value_address (char *regbuf)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
d10v_frame_saved_pc (struct frame_info *frame)
|
d10v_frame_saved_pc (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 d10v_make_iaddr (deprecated_read_register_dummy (frame->pc,
|
return d10v_make_iaddr (deprecated_read_register_dummy (get_frame_pc (frame),
|
||||||
frame->frame,
|
frame->frame,
|
||||||
PC_REGNUM));
|
PC_REGNUM));
|
||||||
else
|
else
|
||||||
|
@ -688,7 +688,7 @@ d10v_frame_chain (struct frame_info *fi)
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
|
|
||||||
/* A generic call dummy's frame is the same as caller's. */
|
/* 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;
|
return fi->frame;
|
||||||
|
|
||||||
d10v_frame_init_saved_regs (fi);
|
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);
|
memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
|
||||||
next_addr = 0;
|
next_addr = 0;
|
||||||
|
|
||||||
pc = get_pc_function_start (fi->pc);
|
pc = get_pc_function_start (get_frame_pc (fi));
|
||||||
|
|
||||||
uses_frame = 0;
|
uses_frame = 0;
|
||||||
while (1)
|
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->size = 0;
|
||||||
fi->extra_info->return_pc = 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
|
then let's snatch the return_pc from the callee, so that
|
||||||
DEPRECATED_PC_IN_CALL_DUMMY will work. */
|
DEPRECATED_PC_IN_CALL_DUMMY will work. */
|
||||||
if (fi->pc == 0 && fi->level != 0 && fi->next != NULL)
|
if (get_frame_pc (fi) == 0 && fi->level != 0 && fi->next != NULL)
|
||||||
fi->pc = d10v_frame_saved_pc (fi->next);
|
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
|
/* The call dummy doesn't save any registers on the stack, so we can
|
||||||
return now. */
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1784,7 +1784,7 @@ cfi_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UNWIND_CONTEXT (fi)->ra = fi->pc + 1;
|
UNWIND_CONTEXT (fi)->ra = get_frame_pc (fi) + 1;
|
||||||
frame_state_for (UNWIND_CONTEXT (fi), fs);
|
frame_state_for (UNWIND_CONTEXT (fi), fs);
|
||||||
update_context (UNWIND_CONTEXT (fi), fs, 0);
|
update_context (UNWIND_CONTEXT (fi), fs, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -470,10 +470,10 @@ h8300_frame_init_saved_regs (struct frame_info *fi)
|
||||||
|
|
||||||
/* Find the beginning of this function, so we can analyze its
|
/* Find the beginning of this function, so we can analyze its
|
||||||
prologue. */
|
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);
|
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. */
|
/* This will fill in fields in fi. */
|
||||||
h8300_examine_prologue (func_addr, limit, fi->frame, fi->saved_regs, 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
|
static CORE_ADDR
|
||||||
h8300_frame_chain (struct frame_info *thisframe)
|
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 */
|
{ /* initialize the from_pc now */
|
||||||
thisframe->extra_info->from_pc =
|
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);
|
E_PC_REGNUM);
|
||||||
return thisframe->frame;
|
return thisframe->frame;
|
||||||
}
|
}
|
||||||
|
@ -511,8 +511,8 @@ h8300_frame_chain (struct frame_info *thisframe)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
h8300_frame_saved_pc (struct frame_info *frame)
|
h8300_frame_saved_pc (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 deprecated_read_register_dummy (frame->pc, frame->frame,
|
return deprecated_read_register_dummy (get_frame_pc (frame), frame->frame,
|
||||||
E_PC_REGNUM);
|
E_PC_REGNUM);
|
||||||
else
|
else
|
||||||
return frame->extra_info->from_pc;
|
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->args_pointer = 0; /* Unknown */
|
||||||
fi->extra_info->locals_pointer = 0; /* Unknown */
|
fi->extra_info->locals_pointer = 0; /* Unknown */
|
||||||
|
|
||||||
if (!fi->pc)
|
if (!get_frame_pc (fi))
|
||||||
{
|
{
|
||||||
if (fi->next)
|
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);
|
h8300_frame_init_saved_regs (fi);
|
||||||
}
|
}
|
||||||
|
@ -541,7 +541,7 @@ h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
h8300_frame_locals_address (struct frame_info *fi)
|
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 (CORE_ADDR) 0; /* Not sure what else to do... */
|
||||||
return fi->extra_info->locals_pointer;
|
return fi->extra_info->locals_pointer;
|
||||||
}
|
}
|
||||||
|
@ -552,7 +552,7 @@ h8300_frame_locals_address (struct frame_info *fi)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
h8300_frame_args_address (struct frame_info *fi)
|
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 (CORE_ADDR) 0; /* Not sure what else to do... */
|
||||||
return fi->extra_info->args_pointer;
|
return fi->extra_info->args_pointer;
|
||||||
}
|
}
|
||||||
|
@ -747,7 +747,7 @@ h8300_pop_frame (void)
|
||||||
unsigned regno;
|
unsigned regno;
|
||||||
struct frame_info *frame = get_current_frame ();
|
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 ();
|
generic_pop_dummy_frame ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -500,7 +500,7 @@ i386_frameless_signal_p (struct frame_info *frame)
|
||||||
{
|
{
|
||||||
return (frame->next && get_frame_type (frame->next) == SIGTRAMP_FRAME
|
return (frame->next && get_frame_type (frame->next) == SIGTRAMP_FRAME
|
||||||
&& (frameless_look_for_prologue (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
|
/* 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
|
static CORE_ADDR
|
||||||
i386_frame_chain (struct frame_info *frame)
|
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;
|
return frame->frame;
|
||||||
|
|
||||||
if (get_frame_type (frame) == SIGTRAMP_FRAME
|
if (get_frame_type (frame) == SIGTRAMP_FRAME
|
||||||
|| i386_frameless_signal_p (frame))
|
|| i386_frameless_signal_p (frame))
|
||||||
return frame->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 read_memory_unsigned_integer (frame->frame, 4);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -567,7 +567,7 @@ i386_sigtramp_saved_sp (struct frame_info *frame)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
i386_frame_saved_pc (struct frame_info *frame)
|
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;
|
ULONGEST pc;
|
||||||
|
|
||||||
|
@ -712,7 +712,7 @@ i386_frame_init_saved_regs (struct frame_info *fip)
|
||||||
|
|
||||||
frame_saved_regs_zalloc (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)
|
if (pc != 0)
|
||||||
locals = i386_get_frame_setup (pc);
|
locals = i386_get_frame_setup (pc);
|
||||||
|
|
||||||
|
@ -1355,7 +1355,7 @@ i386_svr4_sigcontext_addr (struct frame_info *frame)
|
||||||
int sigcontext_offset = -1;
|
int sigcontext_offset = -1;
|
||||||
char *name = NULL;
|
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 (name)
|
||||||
{
|
{
|
||||||
if (strcmp (name, "_sigreturn") == 0)
|
if (strcmp (name, "_sigreturn") == 0)
|
||||||
|
|
|
@ -705,7 +705,7 @@ ia64_frame_chain (struct frame_info *frame)
|
||||||
{
|
{
|
||||||
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
|
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
|
||||||
return read_sigcontext_register (frame, sp_regnum);
|
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;
|
return frame->frame;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -722,8 +722,8 @@ ia64_frame_saved_pc (struct frame_info *frame)
|
||||||
{
|
{
|
||||||
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
|
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
|
||||||
return read_sigcontext_register (frame, pc_regnum);
|
return read_sigcontext_register (frame, pc_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 deprecated_read_register_dummy (frame->pc, frame->frame, pc_regnum);
|
return deprecated_read_register_dummy (get_frame_pc (frame), frame->frame, pc_regnum);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FRAME_INIT_SAVED_REGS (frame);
|
FRAME_INIT_SAVED_REGS (frame);
|
||||||
|
@ -1206,8 +1206,8 @@ ia64_frame_init_saved_regs (struct frame_info *frame)
|
||||||
{
|
{
|
||||||
CORE_ADDR func_start;
|
CORE_ADDR func_start;
|
||||||
|
|
||||||
func_start = get_pc_function_start (frame->pc);
|
func_start = get_pc_function_start (get_frame_pc (frame));
|
||||||
examine_prologue (func_start, 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)
|
if (lval != NULL)
|
||||||
*lval = not_lval;
|
*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)
|
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;
|
CORE_ADDR bsp, cfm;
|
||||||
int next_frame_is_call_dummy = ((frame->next != NULL)
|
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->next->frame));
|
||||||
|
|
||||||
frame->extra_info = (struct frame_extra_info *)
|
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)
|
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,
|
frame->next->frame,
|
||||||
IA64_BSP_REGNUM);
|
IA64_BSP_REGNUM);
|
||||||
cfm = deprecated_read_register_dummy (frame->next->pc,
|
cfm = deprecated_read_register_dummy (get_frame_pc (frame->next),
|
||||||
frame->next->frame,
|
frame->next->frame,
|
||||||
IA64_CFM_REGNUM);
|
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))
|
else if (frn->next && (get_frame_type (frn->next) == SIGTRAMP_FRAME))
|
||||||
cfm = read_sigcontext_register (frn->next, IA64_PFS_REGNUM);
|
cfm = read_sigcontext_register (frn->next, IA64_PFS_REGNUM);
|
||||||
else if (frn->next
|
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))
|
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);
|
IA64_PFS_REGNUM);
|
||||||
else
|
else
|
||||||
cfm = read_register (IA64_PFS_REGNUM);
|
cfm = read_register (IA64_PFS_REGNUM);
|
||||||
|
|
|
@ -434,7 +434,7 @@ m68hc11_pop_frame (void)
|
||||||
register CORE_ADDR fp, sp;
|
register CORE_ADDR fp, sp;
|
||||||
register int regnum;
|
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 ();
|
generic_pop_dummy_frame ();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -812,7 +812,7 @@ m68hc11_frame_chain (struct frame_info *frame)
|
||||||
{
|
{
|
||||||
CORE_ADDR addr;
|
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 */
|
return frame->frame; /* dummy frame same as caller's frame */
|
||||||
|
|
||||||
if (frame->extra_info->return_pc == 0
|
if (frame->extra_info->return_pc == 0
|
||||||
|
@ -845,7 +845,7 @@ m68hc11_frame_init_saved_regs (struct frame_info *fi)
|
||||||
else
|
else
|
||||||
memset (fi->saved_regs, 0, sizeof (fi->saved_regs));
|
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);
|
fi->extra_info->return_kind = m68hc11_get_return_insn (pc);
|
||||||
m68hc11_guess_from_prologue (pc, fi->frame, &pc, &fi->extra_info->size,
|
m68hc11_guess_from_prologue (pc, fi->frame, &pc, &fi->extra_info->size,
|
||||||
fi->saved_regs);
|
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));
|
frame_obstack_alloc (sizeof (struct frame_extra_info));
|
||||||
|
|
||||||
if (fi->next)
|
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);
|
m68hc11_frame_init_saved_regs (fi);
|
||||||
|
|
||||||
if (fromleaf)
|
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);
|
fi->extra_info->return_pc = m68hc11_saved_pc_after_call (fi);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -258,7 +258,7 @@ m68k_frame_chain (struct frame_info *thisframe)
|
||||||
{
|
{
|
||||||
if (get_frame_type (thisframe) == SIGTRAMP_FRAME)
|
if (get_frame_type (thisframe) == SIGTRAMP_FRAME)
|
||||||
return thisframe->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);
|
return read_memory_unsigned_integer (thisframe->frame, 4);
|
||||||
else
|
else
|
||||||
return 0;
|
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);
|
memset (frame_info->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
|
||||||
|
|
||||||
if (frame_info->pc >= possible_call_dummy_start
|
if (get_frame_pc (frame_info) >= possible_call_dummy_start
|
||||||
&& frame_info->pc <= frame_info->frame)
|
&& get_frame_pc (frame_info) <= frame_info->frame)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* It is a call dummy. We could just stop now, since we know
|
/* 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
|
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);
|
nextinsn = read_memory_unsigned_integer (pc, 2);
|
||||||
if (P_PEA_FP == nextinsn
|
if (P_PEA_FP == nextinsn
|
||||||
|
|
|
@ -297,7 +297,7 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
|
||||||
|
|
||||||
dummy->next = NULL;
|
dummy->next = NULL;
|
||||||
dummy->prev = NULL;
|
dummy->prev = NULL;
|
||||||
dummy->pc = pc;
|
deprecated_update_frame_pc_hack (dummy, pc);
|
||||||
dummy->frame = frame;
|
dummy->frame = frame;
|
||||||
dummy->extra_info->status = 0;
|
dummy->extra_info->status = 0;
|
||||||
dummy->extra_info->framesize = 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
|
/* If provided, use the PC in the frame to look up the
|
||||||
start of this function. */
|
start of this function. */
|
||||||
pc = (fi == NULL ? pc : fi->pc);
|
pc = (fi == NULL ? pc : get_frame_pc (fi));
|
||||||
|
|
||||||
/* Find the start of this function. */
|
/* Find the start of this function. */
|
||||||
status = find_pc_partial_function (pc, &name, &func_addr, &func_end);
|
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"));
|
mcore_insn_debug (("MCORE: got jmp r15"));
|
||||||
if (fi->next == NULL)
|
if (fi->next == NULL)
|
||||||
fi->frame = read_sp ();
|
fi->frame = read_sp ();
|
||||||
return fi->pc;
|
return get_frame_pc (fi);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for first insn of prologue */
|
/* 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)
|
if (fi->next == NULL)
|
||||||
fi->frame = read_sp ();
|
fi->frame = read_sp ();
|
||||||
return fi->pc;
|
return get_frame_pc (fi);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Figure out where to stop scanning */
|
/* 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 */
|
/* Don't walk off the end of the function */
|
||||||
stop = (stop > func_end ? func_end : stop);
|
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)
|
for (; fi != NULL; 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))
|
||||||
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)
|
else if (fi->saved_regs[regnum] != 0)
|
||||||
return read_memory_integer (fi->saved_regs[regnum],
|
return read_memory_integer (fi->saved_regs[regnum],
|
||||||
REGISTER_SIZE);
|
REGISTER_SIZE);
|
||||||
|
@ -773,8 +773,8 @@ CORE_ADDR
|
||||||
mcore_frame_saved_pc (struct frame_info * fi)
|
mcore_frame_saved_pc (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 deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
|
return deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, PC_REGNUM);
|
||||||
else
|
else
|
||||||
return mcore_find_callers_reg (fi, PR_REGNUM);
|
return mcore_find_callers_reg (fi, PR_REGNUM);
|
||||||
}
|
}
|
||||||
|
@ -790,7 +790,7 @@ mcore_pop_frame (void)
|
||||||
int rn;
|
int rn;
|
||||||
struct frame_info *fi = get_current_frame ();
|
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 ();
|
generic_pop_dummy_frame ();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1039,7 +1039,7 @@ void
|
||||||
mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||||
{
|
{
|
||||||
if (fi && fi->next)
|
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);
|
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->status = 0;
|
||||||
fi->extra_info->framesize = 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
|
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
|
||||||
by assuming it's always FP. */
|
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
|
else
|
||||||
mcore_analyze_prologue (fi, 0, 0);
|
mcore_analyze_prologue (fi, 0, 0);
|
||||||
|
|
|
@ -1459,7 +1459,7 @@ mips_find_saved_regs (struct frame_info *fci)
|
||||||
/* Don't bother unless we are inside a function prologue. Outside the
|
/* Don't bother unless we are inside a function prologue. Outside the
|
||||||
prologue, we know where everything is. */
|
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
|
/* Not sure exactly what kernel_trap means, but if it means
|
||||||
the kernel saves the registers without a prologue doing it,
|
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
|
/* Scan through this function's instructions preceding the current
|
||||||
PC, and look for those that save registers. */
|
PC, and look for those that save registers. */
|
||||||
while (addr < fci->pc)
|
while (addr < get_frame_pc (fci))
|
||||||
{
|
{
|
||||||
inst = mips_fetch_instruction (addr);
|
inst = mips_fetch_instruction (addr);
|
||||||
if (pc_is_mips16 (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
|
int pcreg = (get_frame_type (frame) == SIGTRAMP_FRAME) ? PC_REGNUM
|
||||||
: (proc_desc ? PROC_PC_REG (proc_desc) : RA_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;
|
LONGEST tmp;
|
||||||
frame_unwind_signed_register (frame, PC_REGNUM, &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)
|
&& !(get_frame_type (frame) == SIGTRAMP_FRAME)
|
||||||
/* For a generic dummy frame, let get_frame_pointer() unwind a
|
/* For a generic dummy frame, let get_frame_pointer() unwind a
|
||||||
register value saved as part of the dummy frame call. */
|
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;
|
return 0;
|
||||||
else
|
else
|
||||||
return get_frame_pointer (frame, proc_desc);
|
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 */
|
/* Use proc_desc calculated in frame_chain */
|
||||||
mips_extra_func_info_t proc_desc =
|
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 *)
|
fci->extra_info = (struct frame_extra_info *)
|
||||||
frame_obstack_alloc (sizeof (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.
|
/* 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
|
Get the value of the frame relative sp, procedure might have been
|
||||||
interrupted by a signal at it's very start. */
|
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))
|
&& !PROC_DESC_IS_DUMMY (proc_desc))
|
||||||
fci->frame = read_next_frame_reg (fci->next, SP_REGNUM);
|
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
|
/* Do not ``fix'' fci->frame. It will have the value of the
|
||||||
generic dummy frame's top-of-stack (since the draft
|
generic dummy frame's top-of-stack (since the draft
|
||||||
fci->frame is obtained by returning the unwound stack
|
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
|
/* FIXME: cagney/2002-11-18: This problem will go away once
|
||||||
frame.c:get_prev_frame() is modified to set the frame's
|
frame.c:get_prev_frame() is modified to set the frame's
|
||||||
type before calling functions like this. */
|
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);
|
(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);
|
frame_saved_regs_zalloc (fci);
|
||||||
memcpy (fci->saved_regs, temp_saved_regs, SIZEOF_FRAME_SAVED_REGS);
|
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);
|
CORE_ADDR new_sp = get_frame_base (frame);
|
||||||
mips_extra_func_info_t proc_desc = frame->extra_info->proc_desc;
|
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 ();
|
generic_pop_dummy_frame ();
|
||||||
flush_cached_frames ();
|
flush_cached_frames ();
|
||||||
|
|
|
@ -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
|
/* Use the PC in the frame if it's provided to look up the
|
||||||
start of this function. */
|
start of this function. */
|
||||||
pc = (fi ? fi->pc : pc);
|
pc = (fi ? get_frame_pc (fi) : pc);
|
||||||
|
|
||||||
/* Find the start of this function. */
|
/* Find the start of this function. */
|
||||||
status = find_pc_partial_function (pc, &name, &func_addr, &func_end);
|
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.
|
been deallocated.
|
||||||
|
|
||||||
fi->frame is bogus, we need to fix it. */
|
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 (status != 0)
|
||||||
{
|
{
|
||||||
if (fi->next == NULL)
|
if (fi->next == NULL)
|
||||||
fi->frame = read_sp ();
|
fi->frame = read_sp ();
|
||||||
return fi->pc;
|
return get_frame_pc (fi);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buf[0] == 0xfe)
|
if (buf[0] == 0xfe)
|
||||||
{
|
{
|
||||||
if (fi->next == NULL)
|
if (fi->next == NULL)
|
||||||
fi->frame = read_sp ();
|
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
|
/* Similarly if we're stopped on the first insn of a prologue as our
|
||||||
frame hasn't been allocated yet. */
|
frame hasn't been allocated yet. */
|
||||||
if (fi && fi->pc == func_addr)
|
if (fi && get_frame_pc (fi) == func_addr)
|
||||||
{
|
{
|
||||||
if (fi->next == NULL)
|
if (fi->next == NULL)
|
||||||
fi->frame = read_sp ();
|
fi->frame = read_sp ();
|
||||||
return fi->pc;
|
return get_frame_pc (fi);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Figure out where to stop scanning. */
|
/* 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. */
|
/* Don't walk off the end of the function. */
|
||||||
stop = stop > func_end ? func_end : stop;
|
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
|
So we set up a dummy frame and call mn10200_analyze_prologue to
|
||||||
find stuff for us. */
|
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;
|
dummy_frame.frame = fi->frame;
|
||||||
memset (dummy_frame.fsr.regs, '\000', sizeof dummy_frame.fsr.regs);
|
memset (dummy_frame.fsr.regs, '\000', sizeof dummy_frame.fsr.regs);
|
||||||
dummy_frame.status = 0;
|
dummy_frame.status = 0;
|
||||||
|
@ -685,7 +685,7 @@ mn10200_pop_frame (struct frame_info *frame)
|
||||||
{
|
{
|
||||||
int regnum;
|
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 ();
|
generic_pop_dummy_frame ();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -862,7 +862,7 @@ mn10200_frame_saved_pc (struct frame_info *fi)
|
||||||
registers. Most of the work is done in mn10200_analyze_prologue().
|
registers. Most of the work is done in mn10200_analyze_prologue().
|
||||||
|
|
||||||
Note that when we are called for the last frame (currently active frame),
|
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
|
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
|
always be correct. mn10200_analyze_prologue will fix fi->frame if
|
||||||
it's not valid.
|
it's not valid.
|
||||||
|
@ -875,7 +875,7 @@ void
|
||||||
mn10200_init_extra_frame_info (struct frame_info *fi)
|
mn10200_init_extra_frame_info (struct frame_info *fi)
|
||||||
{
|
{
|
||||||
if (fi->next)
|
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);
|
memset (fi->fsr.regs, '\000', sizeof fi->fsr.regs);
|
||||||
fi->status = 0;
|
fi->status = 0;
|
||||||
|
|
|
@ -159,7 +159,7 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
|
||||||
}
|
}
|
||||||
dummy->next = NULL;
|
dummy->next = NULL;
|
||||||
dummy->prev = NULL;
|
dummy->prev = NULL;
|
||||||
dummy->pc = pc;
|
deprecated_update_frame_pc_hack (dummy, pc);
|
||||||
dummy->frame = frame;
|
dummy->frame = frame;
|
||||||
dummy->extra_info->status = 0;
|
dummy->extra_info->status = 0;
|
||||||
dummy->extra_info->stack_size = 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
|
/* Use the PC in the frame if it's provided to look up the
|
||||||
start of this function. */
|
start of this function. */
|
||||||
pc = (fi ? fi->pc : pc);
|
pc = (fi ? get_frame_pc (fi) : pc);
|
||||||
|
|
||||||
/* Find the start of this function. */
|
/* Find the start of this function. */
|
||||||
status = find_pc_partial_function (pc, &name, &func_addr, &func_end);
|
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)
|
if (fi->next == NULL)
|
||||||
fi->frame = read_sp ();
|
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
|
/* Similarly if we're stopped on the first insn of a prologue as our
|
||||||
frame hasn't been allocated yet. */
|
frame hasn't been allocated yet. */
|
||||||
if (fi && fi->pc == func_addr)
|
if (fi && get_frame_pc (fi) == func_addr)
|
||||||
{
|
{
|
||||||
if (fi->next == NULL)
|
if (fi->next == NULL)
|
||||||
fi->frame = read_sp ();
|
fi->frame = read_sp ();
|
||||||
return fi->pc;
|
return get_frame_pc (fi);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Figure out where to stop scanning. */
|
/* 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. */
|
/* Don't walk off the end of the function. */
|
||||||
stop = stop > func_end ? func_end : stop;
|
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().
|
registers. Most of the work is done in mn10300_analyze_prologue().
|
||||||
|
|
||||||
Note that when we are called for the last frame (currently active frame),
|
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
|
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
|
always be correct. mn10300_analyze_prologue will fix fi->frame if
|
||||||
it's not valid.
|
it's not valid.
|
||||||
|
@ -896,7 +896,7 @@ static void
|
||||||
mn10300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
mn10300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||||
{
|
{
|
||||||
if (fi->next)
|
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);
|
frame_saved_regs_zalloc (fi);
|
||||||
fi->extra_info = (struct frame_extra_info *)
|
fi->extra_info = (struct frame_extra_info *)
|
||||||
|
|
|
@ -186,7 +186,7 @@ umax_frame_num_args (struct frame_info *fi)
|
||||||
int width;
|
int width;
|
||||||
|
|
||||||
numargs = -1;
|
numargs = -1;
|
||||||
enter_addr = ns32k_get_enter_addr ((fi)->pc);
|
enter_addr = ns32k_get_enter_addr (get_frame_pc (fi));
|
||||||
if (enter_addr > 0)
|
if (enter_addr > 0)
|
||||||
{
|
{
|
||||||
pc = ((enter_addr == 1)
|
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
|
FP value, and that address is saved at the previous FP value as a
|
||||||
4-byte word. */
|
4-byte word. */
|
||||||
|
|
||||||
if (inside_entry_file (frame->pc))
|
if (inside_entry_file (get_frame_pc (frame)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return (read_memory_integer (frame->frame, 4));
|
return (read_memory_integer (frame->frame, 4));
|
||||||
|
@ -351,7 +351,7 @@ ns32k_frame_saved_pc (struct frame_info *frame)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
ns32k_frame_args_address (struct frame_info *frame)
|
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 (frame->frame);
|
||||||
|
|
||||||
return (read_register (SP_REGNUM) - 4);
|
return (read_register (SP_REGNUM) - 4);
|
||||||
|
@ -380,7 +380,7 @@ ns32k_frame_init_saved_regs (struct frame_info *frame)
|
||||||
|
|
||||||
frame_saved_regs_zalloc (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)
|
if (enter_addr > 1)
|
||||||
{
|
{
|
||||||
regmask = read_memory_integer (enter_addr + 1, 1) & 0xff;
|
regmask = read_memory_integer (enter_addr + 1, 1) & 0xff;
|
||||||
|
|
|
@ -773,8 +773,8 @@ s390_function_start (struct frame_info *fi)
|
||||||
|
|
||||||
if (fi->extra_info && fi->extra_info->initialised)
|
if (fi->extra_info && fi->extra_info->initialised)
|
||||||
function_start = fi->extra_info->function_start;
|
function_start = fi->extra_info->function_start;
|
||||||
else if (fi->pc)
|
else if (get_frame_pc (fi))
|
||||||
function_start = get_pc_function_start (fi->pc);
|
function_start = get_pc_function_start (get_frame_pc (fi));
|
||||||
return function_start;
|
return function_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -794,7 +794,7 @@ s390_frameless_function_invocation (struct frame_info *fi)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fextra_info_ptr = &fextra_info;
|
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);
|
fextra_info_ptr, fi, 1);
|
||||||
}
|
}
|
||||||
frameless = ((fextra_info_ptr->stack_bought == 0));
|
frameless = ((fextra_info_ptr->stack_bought == 0));
|
||||||
|
@ -905,8 +905,8 @@ void
|
||||||
s390_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
s390_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||||
{
|
{
|
||||||
fi->extra_info = frame_obstack_alloc (sizeof (struct frame_extra_info));
|
fi->extra_info = frame_obstack_alloc (sizeof (struct frame_extra_info));
|
||||||
if (fi->pc)
|
if (get_frame_pc (fi))
|
||||||
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),
|
||||||
fi->extra_info, fi, 1);
|
fi->extra_info, fi, 1);
|
||||||
else
|
else
|
||||||
s390_memset_extra_info (fi->extra_info);
|
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 */
|
/* zalloc memsets the saved regs */
|
||||||
frame_saved_regs_zalloc (fi);
|
frame_saved_regs_zalloc (fi);
|
||||||
if (fi->pc)
|
if (get_frame_pc (fi))
|
||||||
{
|
{
|
||||||
quick = (fi->extra_info && fi->extra_info->initialised
|
quick = (fi->extra_info && fi->extra_info->initialised
|
||||||
&& fi->extra_info->good_prologue);
|
&& fi->extra_info->good_prologue);
|
||||||
s390_get_frame_info (quick ? fi->extra_info->function_start :
|
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);
|
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)
|
if (fi->extra_info && fi->extra_info->saved_pc_valid)
|
||||||
return fi->extra_info->saved_pc;
|
return fi->extra_info->saved_pc;
|
||||||
|
|
||||||
if (deprecated_generic_find_dummy_frame (fi->pc, fi->frame))
|
if (deprecated_generic_find_dummy_frame (get_frame_pc (fi), fi->frame))
|
||||||
return deprecated_read_register_dummy (fi->pc, fi->frame, S390_PC_REGNUM);
|
return deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, S390_PC_REGNUM);
|
||||||
|
|
||||||
s390_frame_init_saved_regs (fi);
|
s390_frame_init_saved_regs (fi);
|
||||||
if (fi->extra_info)
|
if (fi->extra_info)
|
||||||
|
@ -1008,8 +1008,8 @@ s390_frame_chain (struct frame_info *thisframe)
|
||||||
{
|
{
|
||||||
CORE_ADDR prev_fp = 0;
|
CORE_ADDR prev_fp = 0;
|
||||||
|
|
||||||
if (deprecated_generic_find_dummy_frame (thisframe->pc, thisframe->frame))
|
if (deprecated_generic_find_dummy_frame (get_frame_pc (thisframe), thisframe->frame))
|
||||||
return deprecated_read_register_dummy (thisframe->pc, thisframe->frame,
|
return deprecated_read_register_dummy (get_frame_pc (thisframe), thisframe->frame,
|
||||||
S390_SP_REGNUM);
|
S390_SP_REGNUM);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1018,7 +1018,7 @@ s390_frame_chain (struct frame_info *thisframe)
|
||||||
struct frame_extra_info prev_fextra_info;
|
struct frame_extra_info prev_fextra_info;
|
||||||
|
|
||||||
memset (&prev_fextra_info, 0, sizeof (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;
|
CORE_ADDR saved_pc, sig_pc;
|
||||||
|
|
||||||
|
|
|
@ -928,9 +928,9 @@ gdb_print_insn_sh (bfd_vma memaddr, disassemble_info *info)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
sh_frame_chain (struct frame_info *frame)
|
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 */
|
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);
|
return read_memory_integer (get_frame_base (frame) + frame->extra_info->f_offset, 4);
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -966,11 +966,11 @@ translate_insn_rn (int rn, int media_mode)
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
sh64_frame_chain (struct frame_info *frame)
|
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 */
|
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;
|
int size;
|
||||||
if (gdbarch_tdep (current_gdbarch)->sh_abi == SH_ABI_32)
|
if (gdbarch_tdep (current_gdbarch)->sh_abi == SH_ABI_32)
|
||||||
size = 4;
|
size = 4;
|
||||||
|
@ -991,14 +991,14 @@ static CORE_ADDR
|
||||||
sh_find_callers_reg (struct frame_info *fi, int regnum)
|
sh_find_callers_reg (struct frame_info *fi, int regnum)
|
||||||
{
|
{
|
||||||
for (; fi; fi = fi->next)
|
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
|
/* 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. */
|
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
|
else
|
||||||
{
|
{
|
||||||
FRAME_INIT_SAVED_REGS (fi);
|
FRAME_INIT_SAVED_REGS (fi);
|
||||||
if (!fi->pc)
|
if (!get_frame_pc (fi))
|
||||||
return 0;
|
return 0;
|
||||||
if (fi->saved_regs[regnum] != 0)
|
if (fi->saved_regs[regnum] != 0)
|
||||||
return read_memory_integer (fi->saved_regs[regnum],
|
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;
|
int media_mode = 0;
|
||||||
|
|
||||||
for (; fi; fi = fi->next)
|
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
|
/* 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. */
|
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
|
else
|
||||||
{
|
{
|
||||||
FRAME_INIT_SAVED_REGS (fi);
|
FRAME_INIT_SAVED_REGS (fi);
|
||||||
if (!fi->pc)
|
if (!get_frame_pc (fi))
|
||||||
return 0;
|
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)
|
if (fi->saved_regs[pr_regnum] != 0)
|
||||||
{
|
{
|
||||||
|
@ -1053,7 +1053,7 @@ sh_nofp_frame_init_saved_regs (struct frame_info *fi)
|
||||||
int opc;
|
int opc;
|
||||||
int insn;
|
int insn;
|
||||||
int r3_val = 0;
|
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)
|
if (fi->saved_regs == NULL)
|
||||||
frame_saved_regs_zalloc (fi);
|
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
|
that does not appear to be part of the prologue. But give up
|
||||||
after 20 of them, since we're getting silly then. */
|
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)
|
if (!pc)
|
||||||
{
|
{
|
||||||
fi->pc = 0;
|
deprecated_update_frame_pc_hack (fi, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1392,7 +1392,7 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
|
||||||
int insn_size;
|
int insn_size;
|
||||||
int gdb_register_number;
|
int gdb_register_number;
|
||||||
int 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);
|
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
|
||||||
|
|
||||||
if (fi->saved_regs == NULL)
|
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
|
that does not appear to be part of the prologue. But give up
|
||||||
after 20 of them, since we're getting silly then. */
|
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)
|
if (!pc)
|
||||||
{
|
{
|
||||||
fi->pc = 0;
|
deprecated_update_frame_pc_hack (fi, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1593,7 +1593,7 @@ sh_fp_frame_init_saved_regs (struct frame_info *fi)
|
||||||
int opc;
|
int opc;
|
||||||
int insn;
|
int insn;
|
||||||
int r3_val = 0;
|
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);
|
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
|
||||||
|
|
||||||
if (fi->saved_regs == NULL)
|
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
|
that does not appear to be part of the prologue. But give up
|
||||||
after 20 of them, since we're getting silly then. */
|
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)
|
if (!pc)
|
||||||
{
|
{
|
||||||
fi->pc = 0;
|
deprecated_update_frame_pc_hack (fi, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1724,15 +1724,15 @@ sh_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||||
frame_obstack_alloc (sizeof (struct frame_extra_info));
|
frame_obstack_alloc (sizeof (struct frame_extra_info));
|
||||||
|
|
||||||
if (fi->next)
|
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
|
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
|
||||||
by assuming it's always FP. */
|
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);
|
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,
|
fi->frame,
|
||||||
PC_REGNUM);
|
PC_REGNUM);
|
||||||
fi->extra_info->f_offset = -(CALL_DUMMY_LENGTH + 4);
|
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
|
static void
|
||||||
sh64_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
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 *)
|
fi->extra_info = (struct frame_extra_info *)
|
||||||
frame_obstack_alloc (sizeof (struct frame_extra_info));
|
frame_obstack_alloc (sizeof (struct frame_extra_info));
|
||||||
|
|
||||||
if (fi->next)
|
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
|
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
|
||||||
by assuming it's always FP. */
|
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);
|
SP_REGNUM);
|
||||||
fi->extra_info->return_pc =
|
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->f_offset = -(CALL_DUMMY_LENGTH + 4);
|
||||||
fi->extra_info->leaf_function = 0;
|
fi->extra_info->leaf_function = 0;
|
||||||
return;
|
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
|
but we are in compact mode, it will become the corresponding
|
||||||
compact pseudo register. If there is no corresponding compact
|
compact pseudo register. If there is no corresponding compact
|
||||||
pseudo-register what do we do?*/
|
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);
|
live_regnum = translate_insn_rn (regnum, media_mode);
|
||||||
|
|
||||||
/* Note: since the current frame's registers could only have been
|
/* 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))
|
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 */
|
if (lval) /* found it in a CALL_DUMMY frame */
|
||||||
*lval = not_lval;
|
*lval = not_lval;
|
||||||
if (raw_buffer)
|
if (raw_buffer)
|
||||||
memcpy (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_BYTE (regnum)),
|
||||||
REGISTER_RAW_SIZE (regnum));
|
REGISTER_RAW_SIZE (regnum));
|
||||||
return;
|
return;
|
||||||
|
@ -1909,7 +1909,7 @@ sh_pop_frame (void)
|
||||||
register CORE_ADDR fp;
|
register CORE_ADDR fp;
|
||||||
register int regnum;
|
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 ();
|
generic_pop_dummy_frame ();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1937,9 +1937,9 @@ sh64_pop_frame (void)
|
||||||
register int regnum;
|
register int regnum;
|
||||||
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
|
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 ();
|
generic_pop_dummy_frame ();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2938,7 +2938,7 @@ sh64_show_compact_regs (void)
|
||||||
static void
|
static void
|
||||||
sh64_show_regs (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 ();
|
sh64_show_media_regs ();
|
||||||
else
|
else
|
||||||
sh64_show_compact_regs ();
|
sh64_show_compact_regs ();
|
||||||
|
@ -4113,7 +4113,7 @@ sh_compact_do_registers_info (int regnum, int fpregs)
|
||||||
void
|
void
|
||||||
sh64_do_registers_info (int regnum, int fpregs)
|
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);
|
sh_do_registers_info (regnum, fpregs);
|
||||||
else
|
else
|
||||||
sh_compact_do_registers_info (regnum, fpregs);
|
sh_compact_do_registers_info (regnum, fpregs);
|
||||||
|
|
|
@ -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. */
|
frame. For such functions, the frame pointer is actually in %i7. */
|
||||||
fi->extra_info->flat = 0;
|
fi->extra_info->flat = 0;
|
||||||
fi->extra_info->in_prologue = 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
|
/* 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
|
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);
|
sal = find_pc_line (prologue_start, 0);
|
||||||
if (sal.line == 0) /* no line info, use PC */
|
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)
|
else if (sal.end < prologue_end)
|
||||||
prologue_end = sal.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);
|
insn = read_memory_integer (addr, 4);
|
||||||
if (X_OP (insn) == 2 && X_OP3 (insn) == 0x3c)
|
if (X_OP (insn) == 2 && X_OP3 (insn) == 0x3c)
|
||||||
break; /* SAVE seen, stop searching */
|
break; /* SAVE seen, stop searching */
|
||||||
}
|
}
|
||||||
if (addr >= fi->pc)
|
if (addr >= get_frame_pc (fi))
|
||||||
{
|
{
|
||||||
fi->extra_info->in_prologue = 1;
|
fi->extra_info->in_prologue = 1;
|
||||||
fi->frame = read_register (SP_REGNUM);
|
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. */
|
/* Kludge to cause init_prev_frame_info to destroy the new frame. */
|
||||||
fi->frame = fi->next->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
|
/* Solaris2 ucbsigvechandler passes a pointer to a sigcontext
|
||||||
as the third parameter. The offset to the saved pc is 12. */
|
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);
|
(CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
|
||||||
if (name && STREQ (name, "ucbsigvechandler"))
|
if (name && STREQ (name, "ucbsigvechandler"))
|
||||||
saved_pc_offset = 12;
|
saved_pc_offset = 12;
|
||||||
|
@ -535,7 +535,7 @@ setup_arbitrary_frame (int argc, CORE_ADDR *argv)
|
||||||
"create_new_frame returned invalid frame");
|
"create_new_frame returned invalid frame");
|
||||||
|
|
||||||
frame->extra_info->bottom = argv[1];
|
frame->extra_info->bottom = argv[1];
|
||||||
frame->pc = FRAME_SAVED_PC (frame);
|
deprecated_update_frame_pc_hack (frame, FRAME_SAVED_PC (frame));
|
||||||
return frame;
|
return frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -835,7 +835,7 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
|
||||||
if (raw_buffer != NULL)
|
if (raw_buffer != NULL)
|
||||||
{
|
{
|
||||||
/* Put it back in target format. */
|
/* 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)
|
if (addrp != NULL)
|
||||||
*addrp = 0;
|
*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. */
|
/* 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->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.
|
/* Dummy frame. All but the window regs are in there somewhere.
|
||||||
The window registers are saved on the stack, just like in a
|
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));
|
regs = alloca (NUM_REGS * sizeof (CORE_ADDR));
|
||||||
memset (regs, 0, 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);
|
examine_prologue (func_start, 0, frame1, regs);
|
||||||
addr = regs[regnum];
|
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));
|
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->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. */
|
/* Dummy frame. All but the window regs are in there somewhere. */
|
||||||
for (regnum = G1_REGNUM; regnum < G1_REGNUM + 7; regnum++)
|
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)
|
else if (fi->extra_info->flat)
|
||||||
{
|
{
|
||||||
CORE_ADDR func_start;
|
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);
|
examine_prologue (func_start, 0, fi, saved_regs_addr);
|
||||||
|
|
||||||
/* Flat register window frame. */
|
/* Flat register window frame. */
|
||||||
|
|
|
@ -800,8 +800,8 @@ CORE_ADDR
|
||||||
v850_find_callers_reg (struct frame_info *fi, int regnum)
|
v850_find_callers_reg (struct frame_info *fi, int regnum)
|
||||||
{
|
{
|
||||||
for (; fi; fi = fi->next)
|
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))
|
||||||
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)
|
else if (fi->saved_regs[regnum] != 0)
|
||||||
return read_memory_unsigned_integer (fi->saved_regs[regnum],
|
return read_memory_unsigned_integer (fi->saved_regs[regnum],
|
||||||
v850_register_raw_size (regnum));
|
v850_register_raw_size (regnum));
|
||||||
|
@ -883,7 +883,7 @@ v850_pop_frame (void)
|
||||||
struct frame_info *frame = get_current_frame ();
|
struct frame_info *frame = get_current_frame ();
|
||||||
int regnum;
|
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 ();
|
generic_pop_dummy_frame ();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1009,8 +1009,8 @@ v850_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
|
||||||
CORE_ADDR
|
CORE_ADDR
|
||||||
v850_frame_saved_pc (struct frame_info *fi)
|
v850_frame_saved_pc (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 deprecated_read_register_dummy (fi->pc, fi->frame, E_PC_REGNUM);
|
return deprecated_read_register_dummy (get_frame_pc (fi), fi->frame, E_PC_REGNUM);
|
||||||
else
|
else
|
||||||
return v850_find_callers_reg (fi, E_RP_REGNUM);
|
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
|
/* The call dummy doesn't save any registers on the stack, so we
|
||||||
can return now. */
|
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;
|
return;
|
||||||
|
|
||||||
/* Find the beginning of this function, so we can analyze its
|
/* Find the beginning of this function, so we can analyze its
|
||||||
prologue. */
|
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;
|
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)
|
if (!fi->next && pi.framereg == E_SP_REGNUM)
|
||||||
fi->frame = read_register (pi.framereg) - pi.frameoffset;
|
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().
|
registers. Most of the work is done in scan_prologue().
|
||||||
|
|
||||||
Note that when we are called for the last frame (currently active frame),
|
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
|
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 ()).
|
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;
|
struct prologue_info pi;
|
||||||
|
|
||||||
if (fi->next)
|
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);
|
v850_frame_init_saved_regs (fi);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
/* 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. */
|
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 (0);
|
||||||
|
|
||||||
return (read_memory_integer (frame->frame + 12, 4));
|
return (read_memory_integer (frame->frame + 12, 4));
|
||||||
|
|
|
@ -87,7 +87,7 @@ x86_64_linux_sigcontext_addr (struct frame_info *frame)
|
||||||
CORE_ADDR pc;
|
CORE_ADDR pc;
|
||||||
ULONGEST rsp;
|
ULONGEST rsp;
|
||||||
|
|
||||||
pc = x86_64_linux_sigtramp_start (frame->pc);
|
pc = x86_64_linux_sigtramp_start (get_frame_pc (frame));
|
||||||
if (pc)
|
if (pc)
|
||||||
{
|
{
|
||||||
if (frame->next)
|
if (frame->next)
|
||||||
|
|
|
@ -333,7 +333,7 @@ xstormy16_pop_frame (void)
|
||||||
if (fi == NULL)
|
if (fi == NULL)
|
||||||
return; /* paranoia */
|
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 ();
|
generic_pop_dummy_frame ();
|
||||||
}
|
}
|
||||||
|
@ -466,7 +466,7 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
|
||||||
if (fi)
|
if (fi)
|
||||||
{
|
{
|
||||||
/* In a call dummy, don't touch the frame. */
|
/* 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;
|
return start_addr;
|
||||||
|
|
||||||
/* Grab the frame-relative values of SP and FP, needed below.
|
/* 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
|
/* Find the beginning of this function, so we can analyze its
|
||||||
prologue. */
|
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))
|
||||||
xstormy16_scan_prologue (func_addr, fi->pc, fi, NULL);
|
xstormy16_scan_prologue (func_addr, get_frame_pc (fi), fi, NULL);
|
||||||
/* Else we're out of luck (can't debug completely stripped code).
|
/* Else we're out of luck (can't debug completely stripped code).
|
||||||
FIXME. */
|
FIXME. */
|
||||||
}
|
}
|
||||||
|
@ -756,9 +756,9 @@ xstormy16_frame_saved_pc (struct frame_info *fi)
|
||||||
{
|
{
|
||||||
CORE_ADDR saved_pc;
|
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);
|
E_PC_REGNUM);
|
||||||
}
|
}
|
||||||
else
|
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.
|
or we may be in the prologue, before the FP has been set up.
|
||||||
Unfortunately, we can't make this determination without first
|
Unfortunately, we can't make this determination without first
|
||||||
calling scan_prologue, and we can't do that unles we know the
|
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
|
/* Sometimes we are called from get_prev_frame without
|
||||||
the PC being set up first. Long history, don't ask.
|
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
|
frame, so we should be able to get the saved pc from
|
||||||
the next frame. */
|
the next frame. */
|
||||||
if (fi->next)
|
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). */
|
/* 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
|
static CORE_ADDR
|
||||||
xstormy16_frame_chain (struct frame_info *fi)
|
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. */
|
/* Call dummy's frame is the same as caller's. */
|
||||||
return fi->frame;
|
return fi->frame;
|
||||||
|
|
|
@ -159,7 +159,7 @@ read_memory_pointer (CORE_ADDR x)
|
||||||
CORE_ADDR
|
CORE_ADDR
|
||||||
z8k_frame_chain (struct frame_info *thisframe)
|
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);
|
return read_memory_pointer (thisframe->frame);
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ z8k_frame_init_saved_regs (struct frame_info *frame_info)
|
||||||
int w;
|
int w;
|
||||||
|
|
||||||
frame_saved_regs_zalloc (frame_info);
|
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 */
|
/* wander down the instruction stream */
|
||||||
examine_frame (pc, frame_info->saved_regs, frame_info->frame);
|
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);
|
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;
|
adr = get_frame_base (fip) - locals;
|
||||||
|
|
Loading…
Add table
Reference in a new issue