CORE_ADDR fp;
CORE_ADDR sp;
CORE_ADDR top;
+ struct frame_id id;
struct regcache *regcache;
/* Address range of the call dummy code. Look for PC in the range
cached_find_dummy_frame (struct frame_info *frame, void **cache)
{
if ((*cache) == NULL)
- (*cache) = find_dummy_frame (frame->pc, frame->frame);
+ (*cache) = find_dummy_frame (get_frame_pc (frame), get_frame_base (frame));
return (*cache);
}
generic_push_dummy_frame (void)
{
struct dummy_frame *dummy_frame;
- CORE_ADDR fp = (get_current_frame ())->frame;
+ CORE_ADDR fp = get_frame_base (get_current_frame ());
/* check to see if there are stale dummy frames,
perhaps left over from when a longjump took us out of a
dummy_frame->sp = read_sp ();
dummy_frame->top = 0;
dummy_frame->fp = fp;
+ dummy_frame->id = get_frame_id (get_current_frame ());
regcache_cpy (dummy_frame->regcache, current_regcache);
dummy_frame->next = dummy_frame_stack;
dummy_frame_stack = dummy_frame;
return dummy->pc;
}
+
+struct frame_id
+dummy_frame_id_unwind (struct frame_info *frame,
+ void **cache)
+{
+ struct dummy_frame *dummy = cached_find_dummy_frame (frame, cache);
+ /* Oops! In a dummy-frame but can't find the stack dummy. Pretend
+ that the frame doesn't unwind. Should this function instead
+ return a has-no-caller indication? */
+ if (dummy == NULL)
+ return null_frame_id;
+ return dummy->id;
+}
+