On Wed, 13 Dec 2006 15:40:21 +0100, "Dmitry Adamushko" <dmitry.adamushko@xxxxxxxxx> wrote: > e.g. as we know the start and end address of the function > (ksyms_lookup_size_off()), it's possible to find out a position of the > "prologue" and "epilogue" (addiu sp,sp,SIZE - the same way it's done > in get_frame_info()) so we would know: > > function_start (1), prologue_addr (2), epilogue_addr (3), function_end (4) > > and this would cover the (broken) cases when <epc> is in [1, 2] or [3, 4] > as well as the cases when e.g. <sp> is broken in the prologue ? It would be hard because: * A function can have multiple epilogues. * gcc often moves "if" block codes to end of the function. While current unwind_stack() is not perfect, any attempt to make it robust is welcome. But you might have to analyze _all_ code if you wanted to save _all_ case. I think UNIX's "90% principle" is good enough here. BTW, enqueue_task() will not use stack anymore since SCHED_NO_NO_OMIT_FRAME_POINTER is defined. --- Atsushi Nemoto