This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch/rfc] Add a sentinel frame


+struct frame_id
+generic_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *frame)
+{
+  static struct frame_id id;
+
+  id.base = dummy_frame_stack->top;
+  id.pc = frame->pc;
+
+  return id;
+}
+

No. That would make unwind dummy id's implementation circular. The ID's value is needed to find the correct dummy frame in the dummy_frame_stack.


This method needs to unwind register value's from the NEXT_FRAME and then use that to determine the dummy frame's ID. The d10v's implementation (not yet committed) looks like:

/* Assuming NEXT_FRAME->prev is a dummy, return the frame ID of that
   dummy frame.  The frame ID's base needs to match the TOS value
   saved by save_dummy_frame_tos(), and the PC match the dummy frame's
   breakpoint.  */

static struct frame_id
d10v_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
ULONGEST base;
struct frame_id id;
id.pc = frame_pc_unwind (next_frame);
frame_unwind_unsigned_register (next_frame, SP_REGNUM, &base);
id.base = d10v_make_daddr (base);
return id;
}


Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]