mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-27 22:10:32 +00:00
2003-01-08 Andrew Cagney <cagney@redhat.com>
* alpha-tdep.c: Use get_next_frame. * arm-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto. * dwarf2cfi.c, h8300-tdep.c, i386-tdep.c, ia64-tdep.c: Ditto. * m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c: Ditto. * mips-tdep.c, mn10200-tdep.c, mn10300-tdep.c: Ditto. * ns32k-tdep.c, s390-tdep.c, sh-tdep.c, sparc-tdep.c: Ditto. * v850-tdep.c, vax-tdep.c, x86-64-linux-tdep.c: Ditto. * xstormy16-tdep.c: Ditto.
This commit is contained in:
parent
626d0adf84
commit
11c02a10e2
@ -1,3 +1,14 @@
|
||||
2003-01-08 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* alpha-tdep.c: Use get_next_frame.
|
||||
* arm-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto.
|
||||
* dwarf2cfi.c, h8300-tdep.c, i386-tdep.c, ia64-tdep.c: Ditto.
|
||||
* m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c: Ditto.
|
||||
* mips-tdep.c, mn10200-tdep.c, mn10300-tdep.c: Ditto.
|
||||
* ns32k-tdep.c, s390-tdep.c, sh-tdep.c, sparc-tdep.c: Ditto.
|
||||
* v850-tdep.c, vax-tdep.c, x86-64-linux-tdep.c: Ditto.
|
||||
* xstormy16-tdep.c: Ditto.
|
||||
|
||||
2003-01-07 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* alpha-tdep.c: Use get_frame_base.
|
||||
|
@ -461,14 +461,14 @@ static CORE_ADDR
|
||||
alpha_init_frame_pc_first (int fromleaf, struct frame_info *prev)
|
||||
{
|
||||
return (fromleaf ? SAVED_PC_AFTER_CALL (get_next_frame (prev))
|
||||
: get_next_frame (prev) ? FRAME_SAVED_PC (prev->next)
|
||||
: get_next_frame (prev) ? FRAME_SAVED_PC (get_next_frame (prev))
|
||||
: read_pc ());
|
||||
}
|
||||
|
||||
static CORE_ADDR
|
||||
read_next_frame_reg (struct frame_info *fi, int regno)
|
||||
{
|
||||
for (; fi; fi = fi->next)
|
||||
for (; fi; fi = get_next_frame (fi))
|
||||
{
|
||||
/* We have to get the saved sp from the sigcontext
|
||||
if it is a signal handler frame. */
|
||||
@ -513,7 +513,7 @@ alpha_saved_pc_after_call (struct frame_info *frame)
|
||||
if (tmp != 0)
|
||||
pc = tmp;
|
||||
|
||||
proc_desc = find_proc_desc (pc, frame->next);
|
||||
proc_desc = find_proc_desc (pc, get_next_frame (frame));
|
||||
pcreg = proc_desc ? PROC_PC_REG (proc_desc) : ALPHA_RA_REGNUM;
|
||||
|
||||
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
|
||||
@ -980,7 +980,9 @@ alpha_init_extra_frame_info (int fromleaf, struct frame_info *frame)
|
||||
{
|
||||
/* Use proc_desc calculated in frame_chain */
|
||||
alpha_extra_func_info_t proc_desc =
|
||||
frame->next ? cached_proc_desc : find_proc_desc (get_frame_pc (frame), frame->next);
|
||||
get_next_frame (frame)
|
||||
? cached_proc_desc
|
||||
: find_proc_desc (get_frame_pc (frame), get_next_frame (frame));
|
||||
|
||||
frame_extra_info_zalloc (frame, sizeof (struct frame_extra_info));
|
||||
|
||||
@ -1010,9 +1012,9 @@ alpha_init_extra_frame_info (int fromleaf, struct frame_info *frame)
|
||||
interrupted by a signal at it's very start. */
|
||||
else if (get_frame_pc (frame) == PROC_LOW_ADDR (proc_desc)
|
||||
&& !alpha_proc_desc_is_dyn_sigtramp (proc_desc))
|
||||
deprecated_update_frame_base_hack (frame, read_next_frame_reg (frame->next, SP_REGNUM));
|
||||
deprecated_update_frame_base_hack (frame, read_next_frame_reg (get_next_frame (frame), SP_REGNUM));
|
||||
else
|
||||
deprecated_update_frame_base_hack (frame, read_next_frame_reg (frame->next, PROC_FRAME_REG (proc_desc))
|
||||
deprecated_update_frame_base_hack (frame, read_next_frame_reg (get_next_frame (frame), PROC_FRAME_REG (proc_desc))
|
||||
+ PROC_FRAME_OFFSET (proc_desc));
|
||||
|
||||
if (proc_desc == &temp_proc_desc)
|
||||
@ -1296,7 +1298,7 @@ alpha_pop_frame (void)
|
||||
/* we need proc_desc to know how to restore the registers;
|
||||
if it is NULL, construct (a temporary) one */
|
||||
if (proc_desc == NULL)
|
||||
proc_desc = find_proc_desc (get_frame_pc (frame), frame->next);
|
||||
proc_desc = find_proc_desc (get_frame_pc (frame), get_next_frame (frame));
|
||||
|
||||
/* Question: should we copy this proc_desc and save it in
|
||||
frame->proc_desc? If we do, who will free it?
|
||||
|
@ -992,7 +992,7 @@ arm_find_callers_reg (struct frame_info *fi, int regnum)
|
||||
/* NOTE: cagney/2002-05-03: This function really shouldn't be
|
||||
needed. Instead the (still being written) register unwind
|
||||
function could be called directly. */
|
||||
for (; fi; fi = fi->next)
|
||||
for (; fi; fi = get_next_frame (fi))
|
||||
{
|
||||
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
|
||||
{
|
||||
@ -1089,24 +1089,24 @@ arm_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
fi->extra_info->frameoffset = 0;
|
||||
fi->extra_info->framereg = 0;
|
||||
|
||||
if (fi->next)
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next));
|
||||
if (get_next_frame (fi))
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
|
||||
|
||||
memset (get_frame_saved_regs (fi), '\000', sizeof get_frame_saved_regs (fi));
|
||||
|
||||
/* Compute stack pointer for this frame. We use this value for both
|
||||
the sigtramp and call dummy cases. */
|
||||
if (!fi->next)
|
||||
if (!get_next_frame (fi))
|
||||
sp = read_sp();
|
||||
else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi->next), 0, 0))
|
||||
else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (get_next_frame (fi)), 0, 0))
|
||||
/* For generic dummy frames, pull the value direct from the frame.
|
||||
Having an unwind function to do this would be nice. */
|
||||
sp = deprecated_read_register_dummy (get_frame_pc (fi->next),
|
||||
get_frame_base (fi->next),
|
||||
sp = deprecated_read_register_dummy (get_frame_pc (get_next_frame (fi)),
|
||||
get_frame_base (get_next_frame (fi)),
|
||||
ARM_SP_REGNUM);
|
||||
else
|
||||
sp = (get_frame_base (fi->next) - fi->next->extra_info->frameoffset
|
||||
+ fi->next->extra_info->framesize);
|
||||
sp = (get_frame_base (get_next_frame (fi)) - get_next_frame (fi)->extra_info->frameoffset
|
||||
+ get_next_frame (fi)->extra_info->framesize);
|
||||
|
||||
/* Determine whether or not we're in a sigtramp frame.
|
||||
Unfortunately, it isn't sufficient to test (get_frame_type (fi)
|
||||
@ -1142,13 +1142,13 @@ arm_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
{
|
||||
arm_scan_prologue (fi);
|
||||
|
||||
if (!fi->next)
|
||||
if (!get_next_frame (fi))
|
||||
/* This is the innermost frame? */
|
||||
deprecated_update_frame_base_hack (fi, read_register (fi->extra_info->framereg));
|
||||
else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi->next), 0, 0))
|
||||
else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (get_next_frame (fi)), 0, 0))
|
||||
/* Next inner most frame is a dummy, just grab its frame.
|
||||
Dummy frames always have the same FP as their caller. */
|
||||
deprecated_update_frame_base_hack (fi, get_frame_base (fi->next));
|
||||
deprecated_update_frame_base_hack (fi, get_frame_base (get_next_frame (fi)));
|
||||
else if (fi->extra_info->framereg == ARM_FP_REGNUM
|
||||
|| fi->extra_info->framereg == THUMB_FP_REGNUM)
|
||||
{
|
||||
|
@ -734,8 +734,8 @@ avr_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
{
|
||||
int reg;
|
||||
|
||||
if (fi->next)
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next));
|
||||
if (get_next_frame (fi))
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
|
||||
|
||||
frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
|
||||
frame_saved_regs_zalloc (fi);
|
||||
@ -757,12 +757,12 @@ avr_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
deprecated_update_frame_base_hack (fi, deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi),
|
||||
AVR_PC_REGNUM));
|
||||
}
|
||||
else if (!fi->next) /* this is the innermost frame? */
|
||||
else if (!get_next_frame (fi)) /* this is the innermost frame? */
|
||||
deprecated_update_frame_base_hack (fi, read_register (fi->extra_info->framereg));
|
||||
else if (fi->extra_info->is_main != 1) /* not the innermost frame, not `main' */
|
||||
/* If we have an next frame, the callee saved it. */
|
||||
{
|
||||
struct frame_info *next_fi = fi->next;
|
||||
struct frame_info *next_fi = get_next_frame (fi);
|
||||
if (fi->extra_info->framereg == AVR_SP_REGNUM)
|
||||
deprecated_update_frame_base_hack (fi, get_frame_base (next_fi) + 2 /* ret addr */ + next_fi->extra_info->framesize);
|
||||
/* FIXME: I don't analyse va_args functions */
|
||||
@ -773,7 +773,7 @@ avr_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
unsigned int fp_low, fp_high;
|
||||
|
||||
/* Scan all frames */
|
||||
for (; next_fi; next_fi = next_fi->next)
|
||||
for (; next_fi; next_fi = get_next_frame (next_fi))
|
||||
{
|
||||
/* look for saved AVR_FP_REGNUM */
|
||||
if (get_frame_saved_regs (next_fi)[AVR_FP_REGNUM] && !fp)
|
||||
|
@ -1201,10 +1201,10 @@ cris_frame_init_saved_regs (struct frame_info *fi)
|
||||
void
|
||||
cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
{
|
||||
if (fi->next)
|
||||
if (get_next_frame (fi))
|
||||
{
|
||||
/* Called from get_prev_frame. */
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next));
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
|
||||
}
|
||||
|
||||
frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
|
||||
|
@ -907,8 +907,8 @@ d10v_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
/* If get_frame_pc (fi) is zero, but this is not the outermost frame,
|
||||
then let's snatch the return_pc from the callee, so that
|
||||
DEPRECATED_PC_IN_CALL_DUMMY will work. */
|
||||
if (get_frame_pc (fi) == 0 && fi->level != 0 && fi->next != NULL)
|
||||
deprecated_update_frame_pc_hack (fi, d10v_frame_saved_pc (fi->next));
|
||||
if (get_frame_pc (fi) == 0 && fi->level != 0 && get_next_frame (fi) != NULL)
|
||||
deprecated_update_frame_pc_hack (fi, d10v_frame_saved_pc (get_next_frame (fi)));
|
||||
|
||||
/* The call dummy doesn't save any registers on the stack, so we can
|
||||
return now. */
|
||||
|
@ -1776,9 +1776,9 @@ cfi_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
memset (UNWIND_CONTEXT (fi)->reg, 0,
|
||||
sizeof (struct context_reg) * NUM_REGS);
|
||||
|
||||
if (fi->next)
|
||||
if (get_next_frame (fi))
|
||||
{
|
||||
context_cpy (UNWIND_CONTEXT (fi), UNWIND_CONTEXT (fi->next));
|
||||
context_cpy (UNWIND_CONTEXT (fi), UNWIND_CONTEXT (get_next_frame (fi)));
|
||||
frame_state_for (UNWIND_CONTEXT (fi), fs);
|
||||
update_context (UNWIND_CONTEXT (fi), fs, 1);
|
||||
}
|
||||
@ -1823,7 +1823,7 @@ cfi_get_saved_register (char *raw_buffer,
|
||||
if (addrp) /* default assumption: not found in memory */
|
||||
*addrp = 0;
|
||||
|
||||
if (!frame->next)
|
||||
if (!get_next_frame (frame))
|
||||
{
|
||||
deprecated_read_register_gen (regnum, raw_buffer);
|
||||
if (lval != NULL)
|
||||
@ -1833,7 +1833,7 @@ cfi_get_saved_register (char *raw_buffer,
|
||||
}
|
||||
else
|
||||
{
|
||||
frame = frame->next;
|
||||
frame = get_next_frame (frame);
|
||||
switch (UNWIND_CONTEXT (frame)->reg[regnum].how)
|
||||
{
|
||||
case REG_CTX_UNSAVED:
|
||||
|
@ -537,8 +537,8 @@ h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
|
||||
if (!get_frame_pc (fi))
|
||||
{
|
||||
if (fi->next)
|
||||
deprecated_update_frame_pc_hack (fi, h8300_frame_saved_pc (fi->next));
|
||||
if (get_next_frame (fi))
|
||||
deprecated_update_frame_pc_hack (fi, h8300_frame_saved_pc (get_next_frame (fi)));
|
||||
}
|
||||
h8300_frame_init_saved_regs (fi);
|
||||
}
|
||||
|
@ -499,7 +499,8 @@ i386_get_frame_setup (CORE_ADDR pc)
|
||||
int
|
||||
i386_frameless_signal_p (struct frame_info *frame)
|
||||
{
|
||||
return (frame->next && get_frame_type (frame->next) == SIGTRAMP_FRAME
|
||||
return (get_next_frame (frame)
|
||||
&& get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME
|
||||
&& (frameless_look_for_prologue (frame)
|
||||
|| get_frame_pc (frame) == get_pc_function_start (get_frame_pc (frame))));
|
||||
}
|
||||
@ -581,7 +582,7 @@ i386_frame_saved_pc (struct frame_info *frame)
|
||||
|
||||
if (i386_frameless_signal_p (frame))
|
||||
{
|
||||
CORE_ADDR sp = i386_sigtramp_saved_sp (frame->next);
|
||||
CORE_ADDR sp = i386_sigtramp_saved_sp (get_next_frame (frame));
|
||||
return read_memory_unsigned_integer (sp, 4);
|
||||
}
|
||||
|
||||
@ -1370,8 +1371,8 @@ i386_svr4_sigcontext_addr (struct frame_info *frame)
|
||||
|
||||
gdb_assert (sigcontext_offset != -1);
|
||||
|
||||
if (frame->next)
|
||||
return get_frame_base (frame->next) + sigcontext_offset;
|
||||
if (get_next_frame (frame))
|
||||
return get_frame_base (get_next_frame (frame)) + sigcontext_offset;
|
||||
return read_register (SP_REGNUM) + sigcontext_offset;
|
||||
}
|
||||
|
||||
|
@ -736,8 +736,9 @@ ia64_frame_saved_pc (struct frame_info *frame)
|
||||
|
||||
if (get_frame_saved_regs (frame)[IA64_VRAP_REGNUM])
|
||||
return read_memory_integer (get_frame_saved_regs (frame)[IA64_VRAP_REGNUM], 8);
|
||||
else if (frame->next && (get_frame_type (frame->next) == SIGTRAMP_FRAME))
|
||||
return read_sigcontext_register (frame->next, IA64_BR0_REGNUM);
|
||||
else if (get_next_frame (frame)
|
||||
&& (get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME))
|
||||
return read_sigcontext_register (get_next_frame (frame), IA64_BR0_REGNUM);
|
||||
else /* either frameless, or not far enough along in the prologue... */
|
||||
return ia64_saved_pc_after_call (frame);
|
||||
}
|
||||
@ -1243,7 +1244,7 @@ ia64_get_saved_register (char *raw_buffer,
|
||||
get_frame_base (frame),
|
||||
get_frame_base (frame));
|
||||
|
||||
if (regnum == SP_REGNUM && frame->next)
|
||||
if (regnum == SP_REGNUM && get_next_frame (frame))
|
||||
{
|
||||
/* Handle SP values for all frames but the topmost. */
|
||||
store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
|
||||
@ -1336,10 +1337,10 @@ ia64_get_saved_register (char *raw_buffer,
|
||||
else if (regnum == IA64_IP_REGNUM)
|
||||
{
|
||||
CORE_ADDR pc;
|
||||
if (frame->next)
|
||||
if (get_next_frame (frame))
|
||||
{
|
||||
/* FIXME: Set *addrp, *lval when possible. */
|
||||
pc = ia64_frame_saved_pc (frame->next);
|
||||
pc = ia64_frame_saved_pc (get_next_frame (frame));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1490,49 +1491,49 @@ void
|
||||
ia64_init_extra_frame_info (int fromleaf, struct frame_info *frame)
|
||||
{
|
||||
CORE_ADDR bsp, cfm;
|
||||
int next_frame_is_call_dummy = ((frame->next != NULL)
|
||||
&& DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame->next),
|
||||
get_frame_base (frame->next),
|
||||
get_frame_base (frame->next)));
|
||||
int next_frame_is_call_dummy = ((get_next_frame (frame) != NULL)
|
||||
&& DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (get_next_frame (frame)),
|
||||
get_frame_base (get_next_frame (frame)),
|
||||
get_frame_base (get_next_frame (frame))));
|
||||
|
||||
frame_extra_info_zalloc (frame, sizeof (struct frame_extra_info));
|
||||
|
||||
if (frame->next == 0)
|
||||
if (get_next_frame (frame) == 0)
|
||||
{
|
||||
bsp = read_register (IA64_BSP_REGNUM);
|
||||
cfm = read_register (IA64_CFM_REGNUM);
|
||||
|
||||
}
|
||||
else if ((get_frame_type (frame->next) == SIGTRAMP_FRAME))
|
||||
else if ((get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME))
|
||||
{
|
||||
bsp = read_sigcontext_register (frame->next, IA64_BSP_REGNUM);
|
||||
cfm = read_sigcontext_register (frame->next, IA64_CFM_REGNUM);
|
||||
bsp = read_sigcontext_register (get_next_frame (frame), IA64_BSP_REGNUM);
|
||||
cfm = read_sigcontext_register (get_next_frame (frame), IA64_CFM_REGNUM);
|
||||
}
|
||||
else if (next_frame_is_call_dummy)
|
||||
{
|
||||
bsp = deprecated_read_register_dummy (get_frame_pc (frame->next),
|
||||
get_frame_base (frame->next),
|
||||
bsp = deprecated_read_register_dummy (get_frame_pc (get_next_frame (frame)),
|
||||
get_frame_base (get_next_frame (frame)),
|
||||
IA64_BSP_REGNUM);
|
||||
cfm = deprecated_read_register_dummy (get_frame_pc (frame->next),
|
||||
get_frame_base (frame->next),
|
||||
cfm = deprecated_read_register_dummy (get_frame_pc (get_next_frame (frame)),
|
||||
get_frame_base (get_next_frame (frame)),
|
||||
IA64_CFM_REGNUM);
|
||||
}
|
||||
else
|
||||
{
|
||||
struct frame_info *frn = frame->next;
|
||||
struct frame_info *frn = get_next_frame (frame);
|
||||
|
||||
FRAME_INIT_SAVED_REGS (frn);
|
||||
|
||||
if (get_frame_saved_regs (frn)[IA64_CFM_REGNUM] != 0)
|
||||
cfm = read_memory_integer (get_frame_saved_regs (frn)[IA64_CFM_REGNUM], 8);
|
||||
else if (frn->next && (get_frame_type (frn->next) == SIGTRAMP_FRAME))
|
||||
cfm = read_sigcontext_register (frn->next, IA64_PFS_REGNUM);
|
||||
else if (frn->next
|
||||
&& DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frn->next),
|
||||
get_frame_base (frn->next),
|
||||
get_frame_base (frn->next)))
|
||||
cfm = deprecated_read_register_dummy (get_frame_pc (frn->next),
|
||||
get_frame_base (frn->next),
|
||||
else if (get_next_frame (frn) && (get_frame_type (get_next_frame (frn)) == SIGTRAMP_FRAME))
|
||||
cfm = read_sigcontext_register (get_next_frame (frn), IA64_PFS_REGNUM);
|
||||
else if (get_next_frame (frn)
|
||||
&& DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (get_next_frame (frn)),
|
||||
get_frame_base (get_next_frame (frn)),
|
||||
get_frame_base (get_next_frame (frn))))
|
||||
cfm = deprecated_read_register_dummy (get_frame_pc (get_next_frame (frn)),
|
||||
get_frame_base (get_next_frame (frn)),
|
||||
IA64_PFS_REGNUM);
|
||||
else
|
||||
cfm = read_register (IA64_PFS_REGNUM);
|
||||
@ -1542,8 +1543,8 @@ ia64_init_extra_frame_info (int fromleaf, struct frame_info *frame)
|
||||
frame->extra_info->cfm = cfm;
|
||||
frame->extra_info->sof = cfm & 0x7f;
|
||||
frame->extra_info->sol = (cfm >> 7) & 0x7f;
|
||||
if (frame->next == 0
|
||||
|| (get_frame_type (frame->next) == SIGTRAMP_FRAME)
|
||||
if (get_next_frame (frame) == 0
|
||||
|| (get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME)
|
||||
|| next_frame_is_call_dummy)
|
||||
frame->extra_info->bsp = rse_address_add (bsp, -frame->extra_info->sof);
|
||||
else
|
||||
|
@ -883,8 +883,8 @@ m68hc11_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
|
||||
frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
|
||||
|
||||
if (fi->next)
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next));
|
||||
if (get_next_frame (fi))
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
|
||||
|
||||
m68hc11_frame_init_saved_regs (fi);
|
||||
|
||||
|
@ -283,8 +283,8 @@ m68k_frame_saved_pc (struct frame_info *frame)
|
||||
{
|
||||
if (get_frame_type (frame) == SIGTRAMP_FRAME)
|
||||
{
|
||||
if (frame->next)
|
||||
return read_memory_unsigned_integer (get_frame_base (frame->next)
|
||||
if (get_next_frame (frame))
|
||||
return read_memory_unsigned_integer (get_frame_base (get_next_frame (frame))
|
||||
+ SIG_PC_FP_OFFSET, 4);
|
||||
else
|
||||
return read_memory_unsigned_integer (read_register (SP_REGNUM)
|
||||
@ -336,8 +336,8 @@ delta68_frame_args_address (struct frame_info *frame_info)
|
||||
else if (frameless_look_for_prologue (frame_info))
|
||||
{
|
||||
/* Check for an interrupted system call */
|
||||
if (frame_info->next && (get_frame_type (frame_info->next) == SIGTRAMP_FRAME))
|
||||
return get_frame_base (frame_info->next) + 16;
|
||||
if (get_next_frame (frame_info) && (get_frame_type (get_next_frame (frame_info)) == SIGTRAMP_FRAME))
|
||||
return get_frame_base (get_next_frame (frame_info)) + 16;
|
||||
else
|
||||
return get_frame_base (frame_info) + 4;
|
||||
}
|
||||
|
@ -385,7 +385,7 @@ mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue)
|
||||
if (fi != NULL && IS_RTS (insn))
|
||||
{
|
||||
mcore_insn_debug (("MCORE: got jmp r15"));
|
||||
if (fi->next == NULL)
|
||||
if (get_next_frame (fi) == NULL)
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return get_frame_pc (fi);
|
||||
}
|
||||
@ -393,7 +393,7 @@ mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue)
|
||||
/* Check for first insn of prologue */
|
||||
if (fi != NULL && get_frame_pc (fi) == func_addr)
|
||||
{
|
||||
if (fi->next == NULL)
|
||||
if (get_next_frame (fi) == NULL)
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return get_frame_pc (fi);
|
||||
}
|
||||
@ -613,7 +613,7 @@ mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue)
|
||||
/* Fix the frame pointer. When gcc uses r8 as a frame pointer,
|
||||
it is really an arg ptr. We adjust fi->frame to be a "real"
|
||||
frame pointer. */
|
||||
if (fi->next == NULL)
|
||||
if (get_next_frame (fi) == NULL)
|
||||
{
|
||||
if (fi->extra_info->status & MY_FRAME_IN_SP)
|
||||
deprecated_update_frame_base_hack (fi, read_sp () + framesize);
|
||||
@ -756,7 +756,7 @@ mcore_virtual_frame_pointer (CORE_ADDR pc, int *reg, LONGEST *offset)
|
||||
CORE_ADDR
|
||||
mcore_find_callers_reg (struct frame_info *fi, int regnum)
|
||||
{
|
||||
for (; fi != NULL; fi = fi->next)
|
||||
for (; fi != NULL; fi = get_next_frame (fi))
|
||||
{
|
||||
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
|
||||
get_frame_base (fi)))
|
||||
@ -1044,8 +1044,8 @@ mcore_store_return_value (struct type *type, char *valbuf)
|
||||
void
|
||||
mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
{
|
||||
if (fi && fi->next)
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next));
|
||||
if (fi && get_next_frame (fi))
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
|
||||
|
||||
frame_saved_regs_zalloc (fi);
|
||||
|
||||
|
@ -1449,7 +1449,8 @@ mips_find_saved_regs (struct frame_info *fci)
|
||||
a signal, we assume that all registers have been saved.
|
||||
This assumes that all register saves in a function happen before
|
||||
the first function call. */
|
||||
(fci->next == NULL || (get_frame_type (fci->next) == SIGTRAMP_FRAME))
|
||||
(get_next_frame (fci) == NULL
|
||||
|| (get_frame_type (get_next_frame (fci)) == SIGTRAMP_FRAME))
|
||||
|
||||
/* In a dummy frame we know exactly where things are saved. */
|
||||
&& !PROC_DESC_IS_DUMMY (proc_desc)
|
||||
@ -1680,8 +1681,11 @@ mips_init_frame_pc_first (int fromleaf, struct frame_info *prev)
|
||||
{
|
||||
CORE_ADDR pc, tmp;
|
||||
|
||||
pc = ((fromleaf) ? SAVED_PC_AFTER_CALL (prev->next) :
|
||||
prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ());
|
||||
pc = ((fromleaf)
|
||||
? SAVED_PC_AFTER_CALL (get_next_frame (prev))
|
||||
: get_next_frame (prev)
|
||||
? FRAME_SAVED_PC (get_next_frame (prev))
|
||||
: read_pc ());
|
||||
tmp = SKIP_TRAMPOLINE_CODE (pc);
|
||||
return tmp ? tmp : pc;
|
||||
}
|
||||
@ -2466,7 +2470,9 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
|
||||
|
||||
/* Use proc_desc calculated in frame_chain */
|
||||
mips_extra_func_info_t proc_desc =
|
||||
fci->next ? cached_proc_desc : find_proc_desc (get_frame_pc (fci), fci->next, 1);
|
||||
get_next_frame (fci)
|
||||
? cached_proc_desc
|
||||
: find_proc_desc (get_frame_pc (fci), get_next_frame (fci), 1);
|
||||
|
||||
frame_extra_info_zalloc (fci, sizeof (struct frame_extra_info));
|
||||
|
||||
@ -2481,7 +2487,7 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
|
||||
interrupted by a signal at it's very start. */
|
||||
if (get_frame_pc (fci) == PROC_LOW_ADDR (proc_desc)
|
||||
&& !PROC_DESC_IS_DUMMY (proc_desc))
|
||||
deprecated_update_frame_base_hack (fci, read_next_frame_reg (fci->next, SP_REGNUM));
|
||||
deprecated_update_frame_base_hack (fci, read_next_frame_reg (get_next_frame (fci), SP_REGNUM));
|
||||
else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fci), 0, 0))
|
||||
/* Do not ``fix'' fci->frame. It will have the value of the
|
||||
generic dummy frame's top-of-stack (since the draft
|
||||
@ -2491,7 +2497,7 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
|
||||
part of the dummy frames data. */
|
||||
/* Do nothing. */;
|
||||
else
|
||||
deprecated_update_frame_base_hack (fci, get_frame_pointer (fci->next, proc_desc));
|
||||
deprecated_update_frame_base_hack (fci, get_frame_pointer (get_next_frame (fci), proc_desc));
|
||||
|
||||
if (proc_desc == &temp_proc_desc)
|
||||
{
|
||||
|
@ -152,14 +152,14 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
status = target_read_memory (get_frame_pc (fi), buf, 1);
|
||||
if (status != 0)
|
||||
{
|
||||
if (fi->next == NULL)
|
||||
if (get_next_frame (fi) == NULL)
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return get_frame_pc (fi);
|
||||
}
|
||||
|
||||
if (buf[0] == 0xfe)
|
||||
{
|
||||
if (fi->next == NULL)
|
||||
if (get_next_frame (fi) == NULL)
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return get_frame_pc (fi);
|
||||
}
|
||||
@ -169,7 +169,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
frame hasn't been allocated yet. */
|
||||
if (fi && get_frame_pc (fi) == func_addr)
|
||||
{
|
||||
if (fi->next == NULL)
|
||||
if (get_next_frame (fi) == NULL)
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return get_frame_pc (fi);
|
||||
}
|
||||
@ -186,7 +186,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
status = target_read_memory (addr, buf, 2);
|
||||
if (status != 0)
|
||||
{
|
||||
if (fi && fi->next == NULL && fi->status & MY_FRAME_IN_SP)
|
||||
if (fi && get_next_frame (fi) == NULL && fi->status & MY_FRAME_IN_SP)
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return addr;
|
||||
}
|
||||
@ -217,7 +217,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
{
|
||||
/* We still haven't allocated our local stack. Handle this
|
||||
as if we stopped on the first or last insn of a function. */
|
||||
if (fi && fi->next == NULL)
|
||||
if (fi && get_next_frame (fi) == NULL)
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return addr;
|
||||
}
|
||||
@ -225,7 +225,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
status = target_read_memory (addr, buf, 2);
|
||||
if (status != 0)
|
||||
{
|
||||
if (fi && fi->next == NULL)
|
||||
if (fi && get_next_frame (fi) == NULL)
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return addr;
|
||||
}
|
||||
@ -244,7 +244,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fi && fi->next == NULL)
|
||||
if (fi && get_next_frame (fi) == NULL)
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return addr;
|
||||
}
|
||||
@ -262,7 +262,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
status = target_read_memory (addr, buf, 2);
|
||||
if (status != 0)
|
||||
{
|
||||
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return addr;
|
||||
}
|
||||
@ -274,7 +274,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
addr += 2;
|
||||
if (addr >= stop)
|
||||
{
|
||||
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
|
||||
return addr;
|
||||
}
|
||||
@ -284,7 +284,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
status = target_read_memory (addr + 2, buf, 2);
|
||||
if (status != 0)
|
||||
{
|
||||
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return addr;
|
||||
}
|
||||
@ -294,7 +294,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
addr += 4;
|
||||
if (addr >= stop)
|
||||
{
|
||||
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
|
||||
return addr;
|
||||
}
|
||||
@ -304,7 +304,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
status = target_read_memory (addr + 2, buf, 3);
|
||||
if (status != 0)
|
||||
{
|
||||
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return addr;
|
||||
}
|
||||
@ -314,7 +314,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
addr += 5;
|
||||
if (addr >= stop)
|
||||
{
|
||||
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
|
||||
return addr;
|
||||
}
|
||||
@ -333,7 +333,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
status = target_read_memory (addr + 1, buf, 2);
|
||||
if (status != 0)
|
||||
{
|
||||
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return addr;
|
||||
}
|
||||
@ -345,7 +345,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
status = find_pc_partial_function (temp, &name, NULL, NULL);
|
||||
if (status == 0)
|
||||
{
|
||||
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return addr;
|
||||
}
|
||||
@ -359,7 +359,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
|
||||
if (addr >= stop)
|
||||
{
|
||||
if (fi && fi->next == NULL)
|
||||
if (fi && get_next_frame (fi) == NULL)
|
||||
{
|
||||
fi->stack_size -= 16;
|
||||
deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
|
||||
@ -374,7 +374,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
status = target_read_memory (addr + 2, buf, 3);
|
||||
if (status != 0)
|
||||
{
|
||||
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return addr;
|
||||
}
|
||||
@ -386,7 +386,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
status = find_pc_partial_function (temp, &name, NULL, NULL);
|
||||
if (status == 0)
|
||||
{
|
||||
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return addr;
|
||||
}
|
||||
@ -400,7 +400,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
|
||||
if (addr >= stop)
|
||||
{
|
||||
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
|
||||
{
|
||||
fi->stack_size -= 16;
|
||||
deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
|
||||
@ -420,7 +420,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
fi->stack_size -= 16;
|
||||
|
||||
/* Update fi->frame if necessary. */
|
||||
if (fi && fi->next == NULL)
|
||||
if (fi && get_next_frame (fi) == NULL)
|
||||
deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
|
||||
|
||||
/* After the out of line prologue, there may be another
|
||||
@ -470,7 +470,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
status = target_read_memory (addr + 2, buf, 3);
|
||||
if (status != 0)
|
||||
{
|
||||
if (fi && fi->next == NULL)
|
||||
if (fi && get_next_frame (fi) == NULL)
|
||||
{
|
||||
fi->fsr.regs[2] = get_frame_base (fi) + fi->stack_size + 4;
|
||||
fi->fsr.regs[3] = get_frame_base (fi) + fi->stack_size + 8;
|
||||
@ -487,7 +487,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
|
||||
/* Now that we know the size of the outgoing arguments, fix
|
||||
fi->frame again if this is the innermost frame. */
|
||||
if (fi && fi->next == NULL)
|
||||
if (fi && get_next_frame (fi) == NULL)
|
||||
deprecated_update_frame_base_hack (fi, get_frame_base (fi) - outgoing_args_size);
|
||||
|
||||
/* Note the register save information and update the stack
|
||||
@ -509,7 +509,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
If MY_FRAME_IN_SP is set and we're the innermost frame, then we
|
||||
need to fix fi->frame so that backtracing, find_frame_saved_regs,
|
||||
etc work correctly. */
|
||||
if (fi && fi->next == NULL && (fi->status & MY_FRAME_IN_SP) != 0)
|
||||
if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP) != 0)
|
||||
deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
|
||||
|
||||
/* And last we have the register saves. These are relatively
|
||||
@ -880,8 +880,8 @@ mn10200_frame_saved_pc (struct frame_info *fi)
|
||||
void
|
||||
mn10200_init_extra_frame_info (struct frame_info *fi)
|
||||
{
|
||||
if (fi->next)
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next));
|
||||
if (get_next_frame (fi))
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
|
||||
|
||||
memset (fi->fsr.regs, '\000', sizeof fi->fsr.regs);
|
||||
fi->status = 0;
|
||||
|
@ -207,7 +207,7 @@ mn10300_breakpoint_from_pc (CORE_ADDR *bp_addr, int *bp_size)
|
||||
static void
|
||||
fix_frame_pointer (struct frame_info *fi, int stack_size)
|
||||
{
|
||||
if (fi && fi->next == NULL)
|
||||
if (fi && get_next_frame (fi) == NULL)
|
||||
{
|
||||
if (fi->extra_info->status & MY_FRAME_IN_SP)
|
||||
deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
|
||||
@ -436,7 +436,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
In this case fi->frame is bogus, we need to fix it. */
|
||||
if (fi && buf[0] == 0xf0 && buf[1] == 0xfc)
|
||||
{
|
||||
if (fi->next == NULL)
|
||||
if (get_next_frame (fi) == NULL)
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return get_frame_pc (fi);
|
||||
}
|
||||
@ -445,7 +445,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
frame hasn't been allocated yet. */
|
||||
if (fi && get_frame_pc (fi) == func_addr)
|
||||
{
|
||||
if (fi->next == NULL)
|
||||
if (get_next_frame (fi) == NULL)
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
return get_frame_pc (fi);
|
||||
}
|
||||
@ -494,7 +494,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
if (addr >= stop)
|
||||
{
|
||||
/* Fix fi->frame since it's bogus at this point. */
|
||||
if (fi && fi->next == NULL)
|
||||
if (fi && get_next_frame (fi) == NULL)
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
|
||||
/* Note if/where callee saved registers were saved. */
|
||||
@ -507,7 +507,7 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
|
||||
if (status != 0)
|
||||
{
|
||||
/* Fix fi->frame since it's bogus at this point. */
|
||||
if (fi && fi->next == NULL)
|
||||
if (fi && get_next_frame (fi) == NULL)
|
||||
deprecated_update_frame_base_hack (fi, read_sp ());
|
||||
|
||||
/* Note if/where callee saved registers were saved. */
|
||||
@ -897,8 +897,8 @@ mn10300_frame_saved_pc (struct frame_info *fi)
|
||||
static void
|
||||
mn10300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
{
|
||||
if (fi->next)
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next));
|
||||
if (get_next_frame (fi))
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
|
||||
|
||||
frame_saved_regs_zalloc (fi);
|
||||
frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
|
||||
|
@ -325,9 +325,9 @@ ns32k_sigtramp_saved_pc (struct frame_info *frame)
|
||||
|
||||
buf = alloca (ptrbytes);
|
||||
/* Get sigcontext address, it is the third parameter on the stack. */
|
||||
if (frame->next)
|
||||
if (get_next_frame (frame))
|
||||
sigcontext_addr = read_memory_typed_address
|
||||
(FRAME_ARGS_ADDRESS (frame->next) + FRAME_ARGS_SKIP + sigcontext_offs,
|
||||
(FRAME_ARGS_ADDRESS (get_next_frame (frame)) + FRAME_ARGS_SKIP + sigcontext_offs,
|
||||
builtin_type_void_data_ptr);
|
||||
else
|
||||
sigcontext_addr = read_memory_typed_address
|
||||
|
@ -316,18 +316,19 @@ s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info,
|
||||
if (instr[0] == S390_SYSCALL_OPCODE && test_pc == pc)
|
||||
{
|
||||
good_prologue = 1;
|
||||
if (saved_regs && fextra_info && fi->next && fi->next->extra_info
|
||||
&& fi->next->extra_info->sigcontext)
|
||||
if (saved_regs && fextra_info && get_next_frame (fi)
|
||||
&& get_next_frame (fi)->extra_info
|
||||
&& get_next_frame (fi)->extra_info->sigcontext)
|
||||
{
|
||||
/* We are backtracing from a signal handler */
|
||||
save_reg_addr = fi->next->extra_info->sigcontext +
|
||||
save_reg_addr = get_next_frame (fi)->extra_info->sigcontext +
|
||||
REGISTER_BYTE (S390_GP0_REGNUM);
|
||||
for (regidx = 0; regidx < S390_NUM_GPRS; regidx++)
|
||||
{
|
||||
saved_regs[S390_GP0_REGNUM + regidx] = save_reg_addr;
|
||||
save_reg_addr += S390_GPR_SIZE;
|
||||
}
|
||||
save_reg_addr = fi->next->extra_info->sigcontext +
|
||||
save_reg_addr = get_next_frame (fi)->extra_info->sigcontext +
|
||||
(GDB_TARGET_IS_ESAME ? S390X_SIGREGS_FP0_OFFSET :
|
||||
S390_SIGREGS_FP0_OFFSET);
|
||||
for (regidx = 0; regidx < S390_NUM_FPRS; regidx++)
|
||||
@ -787,7 +788,7 @@ s390_frameless_function_invocation (struct frame_info *fi)
|
||||
struct frame_extra_info fextra_info, *fextra_info_ptr;
|
||||
int frameless = 0;
|
||||
|
||||
if (fi->next == NULL) /* no may be frameless */
|
||||
if (get_next_frame (fi) == NULL) /* no may be frameless */
|
||||
{
|
||||
if (fi->extra_info)
|
||||
fextra_info_ptr = fi->extra_info;
|
||||
|
@ -995,7 +995,7 @@ sh64_frame_chain (struct frame_info *frame)
|
||||
static CORE_ADDR
|
||||
sh_find_callers_reg (struct frame_info *fi, int regnum)
|
||||
{
|
||||
for (; fi; fi = fi->next)
|
||||
for (; fi; fi = get_next_frame (fi))
|
||||
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
|
||||
get_frame_base (fi)))
|
||||
/* When the caller requests PR from the dummy frame, we return PC because
|
||||
@ -1019,7 +1019,7 @@ sh64_get_saved_pr (struct frame_info *fi, int pr_regnum)
|
||||
{
|
||||
int media_mode = 0;
|
||||
|
||||
for (; fi; fi = fi->next)
|
||||
for (; fi; fi = get_next_frame (fi))
|
||||
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
|
||||
get_frame_base (fi)))
|
||||
/* When the caller requests PR from the dummy frame, we return PC because
|
||||
@ -1732,8 +1732,8 @@ sh_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
|
||||
frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
|
||||
|
||||
if (fi->next)
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next));
|
||||
if (get_next_frame (fi))
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
|
||||
|
||||
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
|
||||
get_frame_base (fi)))
|
||||
@ -1764,8 +1764,8 @@ sh64_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
|
||||
frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
|
||||
|
||||
if (fi->next)
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next));
|
||||
if (get_next_frame (fi))
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
|
||||
|
||||
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
|
||||
get_frame_base (fi)))
|
||||
@ -1823,7 +1823,7 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
|
||||
the current frame itself: otherwise, we would be getting the
|
||||
previous frame's registers which were saved by the current frame. */
|
||||
|
||||
while (frame && ((frame = frame->next) != NULL))
|
||||
while (frame && ((frame = get_next_frame (frame)) != NULL))
|
||||
{
|
||||
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
|
||||
get_frame_base (frame),
|
||||
|
@ -296,13 +296,15 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
frame_saved_regs_zalloc (fi);
|
||||
|
||||
fi->extra_info->bottom =
|
||||
(fi->next ?
|
||||
(get_frame_base (fi) == get_frame_base (fi->next) ? fi->next->extra_info->bottom :
|
||||
get_frame_base (fi->next)) : read_sp ());
|
||||
(get_next_frame (fi)
|
||||
? (get_frame_base (fi) == get_frame_base (get_next_frame (fi))
|
||||
? get_next_frame (fi)->extra_info->bottom
|
||||
: get_frame_base (get_next_frame (fi)))
|
||||
: read_sp ());
|
||||
|
||||
/* If fi->next is NULL, then we already set ->frame by passing read_fp()
|
||||
to create_new_frame. */
|
||||
if (fi->next)
|
||||
if (get_next_frame (fi))
|
||||
{
|
||||
char *buf;
|
||||
|
||||
@ -310,15 +312,15 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
|
||||
/* Compute ->frame as if not flat. If it is flat, we'll change
|
||||
it later. */
|
||||
if (fi->next->next != NULL
|
||||
&& ((get_frame_type (fi->next->next) == SIGTRAMP_FRAME)
|
||||
|| deprecated_frame_in_dummy (fi->next->next))
|
||||
&& frameless_look_for_prologue (fi->next))
|
||||
if (get_next_frame (get_next_frame (fi)) != NULL
|
||||
&& ((get_frame_type (get_next_frame (get_next_frame (fi))) == SIGTRAMP_FRAME)
|
||||
|| deprecated_frame_in_dummy (get_next_frame (get_next_frame (fi))))
|
||||
&& frameless_look_for_prologue (get_next_frame (fi)))
|
||||
{
|
||||
/* A frameless function interrupted by a signal did not change
|
||||
the frame pointer, fix up frame pointer accordingly. */
|
||||
deprecated_update_frame_base_hack (fi, get_frame_base (fi->next));
|
||||
fi->extra_info->bottom = fi->next->extra_info->bottom;
|
||||
deprecated_update_frame_base_hack (fi, get_frame_base (get_next_frame (fi)));
|
||||
fi->extra_info->bottom = get_next_frame (fi)->extra_info->bottom;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -415,11 +417,11 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fi->next && get_frame_base (fi) == 0)
|
||||
if (get_next_frame (fi) && get_frame_base (fi) == 0)
|
||||
{
|
||||
/* Kludge to cause init_prev_frame_info to destroy the new frame. */
|
||||
deprecated_update_frame_base_hack (fi, get_frame_base (fi->next));
|
||||
deprecated_update_frame_pc_hack (fi, get_frame_pc (fi->next));
|
||||
deprecated_update_frame_base_hack (fi, get_frame_base (get_next_frame (fi)));
|
||||
deprecated_update_frame_pc_hack (fi, get_frame_pc (get_next_frame (fi)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -483,9 +485,9 @@ sparc_frame_saved_pc (struct frame_info *frame)
|
||||
return extract_address (scbuf, sizeof (scbuf));
|
||||
}
|
||||
else if (frame->extra_info->in_prologue ||
|
||||
(frame->next != NULL &&
|
||||
((get_frame_type (frame->next) == SIGTRAMP_FRAME) ||
|
||||
deprecated_frame_in_dummy (frame->next)) &&
|
||||
(get_next_frame (frame) != NULL &&
|
||||
((get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME) ||
|
||||
deprecated_frame_in_dummy (get_next_frame (frame))) &&
|
||||
frameless_look_for_prologue (frame)))
|
||||
{
|
||||
/* A frameless function interrupted by a signal did not save
|
||||
@ -822,7 +824,7 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
|
||||
}
|
||||
|
||||
|
||||
frame1 = frame->next;
|
||||
frame1 = get_next_frame (frame);
|
||||
|
||||
/* Get saved PC from the frame info if not in innermost frame. */
|
||||
if (regnum == PC_REGNUM && frame1 != NULL)
|
||||
@ -927,7 +929,7 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
|
||||
}
|
||||
if (addr != 0)
|
||||
break;
|
||||
frame1 = frame1->next;
|
||||
frame1 = get_next_frame (frame1);
|
||||
}
|
||||
if (addr != 0)
|
||||
{
|
||||
@ -1181,7 +1183,7 @@ sparc_frame_find_saved_regs (struct frame_info *fi, CORE_ADDR *saved_regs_addr)
|
||||
(frame_addr + (regnum - I0_REGNUM) * SPARC_INTREG_SIZE
|
||||
+ FRAME_SAVED_I0);
|
||||
}
|
||||
if (fi->next)
|
||||
if (get_next_frame (fi))
|
||||
{
|
||||
if (fi->extra_info->flat)
|
||||
{
|
||||
@ -1191,8 +1193,8 @@ sparc_frame_find_saved_regs (struct frame_info *fi, CORE_ADDR *saved_regs_addr)
|
||||
{
|
||||
/* Pull off either the next frame pointer or the stack pointer */
|
||||
CORE_ADDR next_next_frame_addr =
|
||||
(fi->next->extra_info->bottom ?
|
||||
fi->next->extra_info->bottom : read_sp ());
|
||||
(get_next_frame (fi)->extra_info->bottom ?
|
||||
get_next_frame (fi)->extra_info->bottom : read_sp ());
|
||||
for (regnum = O0_REGNUM; regnum < O0_REGNUM + 8; regnum++)
|
||||
saved_regs_addr[regnum] =
|
||||
(next_next_frame_addr
|
||||
|
@ -800,7 +800,7 @@ v850_scan_prologue (CORE_ADDR pc, struct prologue_info *pi)
|
||||
CORE_ADDR
|
||||
v850_find_callers_reg (struct frame_info *fi, int regnum)
|
||||
{
|
||||
for (; fi; fi = fi->next)
|
||||
for (; fi; fi = get_next_frame (fi))
|
||||
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
|
||||
get_frame_base (fi)))
|
||||
return deprecated_read_register_dummy (get_frame_pc (fi),
|
||||
@ -1130,7 +1130,7 @@ v850_frame_init_saved_regs (struct frame_info *fi)
|
||||
|
||||
v850_scan_prologue (get_frame_pc (fi), &pi);
|
||||
|
||||
if (!fi->next && pi.framereg == E_SP_REGNUM)
|
||||
if (!get_next_frame (fi) && pi.framereg == E_SP_REGNUM)
|
||||
deprecated_update_frame_base_hack (fi, read_register (pi.framereg) - pi.frameoffset);
|
||||
|
||||
for (pifsr = pifsrs; pifsr->framereg; pifsr++)
|
||||
@ -1164,8 +1164,8 @@ v850_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
{
|
||||
struct prologue_info pi;
|
||||
|
||||
if (fi->next)
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (fi->next));
|
||||
if (get_next_frame (fi))
|
||||
deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
|
||||
|
||||
v850_frame_init_saved_regs (fi);
|
||||
}
|
||||
|
@ -170,9 +170,10 @@ vax_sigtramp_saved_pc (struct frame_info *frame)
|
||||
|
||||
buf = alloca (ptrbytes);
|
||||
/* Get sigcontext address, it is the third parameter on the stack. */
|
||||
if (frame->next)
|
||||
if (get_next_frame (frame))
|
||||
sigcontext_addr = read_memory_typed_address
|
||||
(FRAME_ARGS_ADDRESS (frame->next) + FRAME_ARGS_SKIP + sigcontext_offs,
|
||||
(FRAME_ARGS_ADDRESS (get_next_frame (frame))
|
||||
+ FRAME_ARGS_SKIP + sigcontext_offs,
|
||||
builtin_type_void_data_ptr);
|
||||
else
|
||||
sigcontext_addr = read_memory_typed_address
|
||||
@ -205,8 +206,8 @@ vax_frame_args_address_correct (struct frame_info *frame)
|
||||
(which is one reason that "info frame" exists). So, return 0 (indicating
|
||||
we don't know the address of the arglist) if we don't know what frame
|
||||
this frame calls. */
|
||||
if (frame->next)
|
||||
return (read_memory_integer (get_frame_base (frame->next) + 8, 4));
|
||||
if (get_next_frame (frame))
|
||||
return (read_memory_integer (get_frame_base (get_next_frame (frame)) + 8, 4));
|
||||
|
||||
return (0);
|
||||
}
|
||||
@ -217,8 +218,8 @@ vax_frame_args_address (struct frame_info *frame)
|
||||
/* In most of GDB, getting the args address is too important to
|
||||
just say "I don't know". This is sometimes wrong for functions
|
||||
that aren't on top of the stack, but c'est la vie. */
|
||||
if (frame->next)
|
||||
return (read_memory_integer (get_frame_base (frame->next) + 8, 4));
|
||||
if (get_next_frame (frame))
|
||||
return (read_memory_integer (get_frame_base (get_next_frame (frame)) + 8, 4));
|
||||
|
||||
return (read_register (VAX_AP_REGNUM));
|
||||
}
|
||||
|
@ -91,11 +91,11 @@ x86_64_linux_sigcontext_addr (struct frame_info *frame)
|
||||
pc = x86_64_linux_sigtramp_start (get_frame_pc (frame));
|
||||
if (pc)
|
||||
{
|
||||
if (frame->next)
|
||||
if (get_next_frame (frame))
|
||||
/* If this isn't the top frame, the next frame must be for the
|
||||
signal handler itself. The sigcontext structure is part of
|
||||
the user context. */
|
||||
return get_frame_base (frame->next) + LINUX_SIGINFO_SIZE +
|
||||
return get_frame_base (get_next_frame (frame)) + LINUX_SIGINFO_SIZE +
|
||||
LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
|
||||
|
||||
|
||||
@ -167,7 +167,7 @@ x86_64_linux_frame_chain (struct frame_info *fi)
|
||||
addr = get_frame_base (fi);
|
||||
}
|
||||
else
|
||||
addr = get_frame_base (fi->next);
|
||||
addr = get_frame_base (get_next_frame (fi));
|
||||
|
||||
addr += LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
|
||||
|
||||
@ -181,7 +181,8 @@ x86_64_init_frame_pc (int fromleaf, struct frame_info *fi)
|
||||
{
|
||||
CORE_ADDR addr;
|
||||
|
||||
if (get_next_frame (fi) && (get_frame_type (fi->next) == SIGTRAMP_FRAME))
|
||||
if (get_next_frame (fi)
|
||||
&& (get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME))
|
||||
{
|
||||
addr = get_frame_base (get_next_frame (get_next_frame (fi)))
|
||||
+ LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
|
||||
|
@ -803,8 +803,8 @@ xstormy16_init_extra_frame_info (int fromleaf, struct frame_info *fi)
|
||||
Fortunately this will never happen from the outermost
|
||||
frame, so we should be able to get the saved pc from
|
||||
the next frame. */
|
||||
if (fi->next)
|
||||
deprecated_update_frame_pc_hack (fi, xstormy16_frame_saved_pc (fi->next));
|
||||
if (get_next_frame (fi))
|
||||
deprecated_update_frame_pc_hack (fi, xstormy16_frame_saved_pc (get_next_frame (fi)));
|
||||
}
|
||||
|
||||
/* Take care of the saved_regs right here (non-lazy). */
|
||||
|
Loading…
Reference in New Issue
Block a user