fi->extra_info = (struct frame_extra_info *)
frame_obstack_alloc (sizeof (struct frame_extra_info));
fi->extra_info->initial_sp = 0;
- if (fi->next != (CORE_ADDR) 0
+ if (get_next_frame (fi) != (CORE_ADDR) 0
&& fi->pc < TEXT_SEGMENT_BASE)
/* We're in get_prev_frame */
/* and this is a special signal frame. */
/* (fi->pc will be some low address in the kernel, */
/* to which the signal handler returns). */
- fi->signal_handler_caller = 1;
+ deprecated_set_frame_type (fi, SIGTRAMP_FRAME);
}
/* Put here the code to store, into a struct frame_saved_regs,
fi = get_current_frame ();
if (fi != NULL)
- dest = read_memory_addr (fi->frame + SIG_FRAME_PC_OFFSET,
+ dest = read_memory_addr (get_frame_base (fi) + SIG_FRAME_PC_OFFSET,
gdbarch_tdep (current_gdbarch)->wordsize);
}
}
int ii, wordsize;
pc = read_pc ();
- sp = FRAME_FP (frame);
+ sp = get_frame_base (frame);
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc,
+ get_frame_base (frame),
+ get_frame_base (frame)))
{
generic_pop_dummy_frame ();
flush_cached_frames ();
/* Don't even think about framelessness except on the innermost frame
or if the function was interrupted by a signal. */
- if (fi->next != NULL && !fi->next->signal_handler_caller)
+ if (get_next_frame (fi) != NULL
+ && !(get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME))
return 0;
func_start = get_pc_function_start (fi->pc);
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int wordsize = tdep->wordsize;
- if (fi->signal_handler_caller)
- return read_memory_addr (fi->frame + SIG_FRAME_PC_OFFSET, wordsize);
+ if ((get_frame_type (fi) == SIGTRAMP_FRAME))
+ return read_memory_addr (get_frame_base (fi) + SIG_FRAME_PC_OFFSET,
+ wordsize);
- if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
- return deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
+ if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc,
+ get_frame_base (fi),
+ get_frame_base (fi)))
+ return deprecated_read_register_dummy (fi->pc,
+ get_frame_base (fi), PC_REGNUM);
func_start = get_pc_function_start (fi->pc);
(void) skip_prologue (func_start, fi->pc, &fdata);
- if (fdata.lr_offset == 0 && fi->next != NULL)
+ if (fdata.lr_offset == 0 && get_next_frame (fi) != NULL)
{
- if (fi->next->signal_handler_caller)
- return read_memory_addr (fi->next->frame + SIG_FRAME_LR_OFFSET,
+ if ((get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME))
+ return read_memory_addr ((get_frame_base (get_next_frame (fi))
+ + SIG_FRAME_LR_OFFSET),
wordsize);
- else if (PC_IN_CALL_DUMMY (get_next_frame (fi)->pc, 0, 0))
+ else if (DEPRECATED_PC_IN_CALL_DUMMY (get_next_frame (fi)->pc, 0, 0))
/* The link register wasn't saved by this frame and the next
(inner, newer) frame is a dummy. Get the link register
value by unwinding it from that [dummy] frame. */
if (fdata.alloca_reg < 0)
{
- fi->extra_info->initial_sp = fi->frame;
+ fi->extra_info->initial_sp = get_frame_base (fi);
return fi->extra_info->initial_sp;
}
/* NOTE: cagney/2002-04-17: At present the only time
frame_register_read will fail is when the register isn't
available. If that does happen, use the frame. */
- fi->extra_info->initial_sp = fi->frame;
+ fi->extra_info->initial_sp = get_frame_base (fi);
}
return fi->extra_info->initial_sp;
}
CORE_ADDR fp, fpp, lr;
int wordsize = gdbarch_tdep (current_gdbarch)->wordsize;
- if (PC_IN_CALL_DUMMY (thisframe->pc, thisframe->frame, thisframe->frame))
+ if (DEPRECATED_PC_IN_CALL_DUMMY (thisframe->pc,
+ get_frame_base (thisframe),
+ get_frame_base (thisframe)))
/* A dummy frame always correctly chains back to the previous
frame. */
- return read_memory_addr ((thisframe)->frame, wordsize);
+ return read_memory_addr (get_frame_base (thisframe), wordsize);
if (inside_entry_file (thisframe->pc) ||
thisframe->pc == entry_point_address ())
return 0;
- if (thisframe->signal_handler_caller)
- fp = read_memory_addr (thisframe->frame + SIG_FRAME_FP_OFFSET,
- wordsize);
- else if (thisframe->next != NULL
- && thisframe->next->signal_handler_caller
+ if ((get_frame_type (thisframe) == SIGTRAMP_FRAME))
+ fp = read_memory_addr (get_frame_base (thisframe) + SIG_FRAME_FP_OFFSET,
+ wordsize);
+ else if (get_next_frame (thisframe) != NULL
+ && (get_frame_type (get_next_frame (thisframe)) == SIGTRAMP_FRAME)
&& FRAMELESS_FUNCTION_INVOCATION (thisframe))
/* A frameless function interrupted by a signal did not change the
frame pointer. */
- fp = FRAME_FP (thisframe);
+ fp = get_frame_base (thisframe);
else
- fp = read_memory_addr ((thisframe)->frame, wordsize);
+ fp = read_memory_addr (get_frame_base (thisframe), wordsize);
return fp;
}
set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
set_gdbarch_char_signed (gdbarch, 0);
- set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_pc_in_call_dummy (gdbarch, generic_pc_in_call_dummy);
set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
- set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
set_gdbarch_fix_call_dummy (gdbarch, rs6000_fix_call_dummy);
set_gdbarch_frame_align (gdbarch, rs6000_frame_align);
set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);