Frame lost after 'leave' and before 'ret' instruction on i386?
Mark Kettenis
mark.kettenis@xs4all.nl
Thu Jun 5 20:12:00 GMT 2008
> From: Aleksandar Ristovski <aristovski@qnx.com>
> Date: Wed, 04 Jun 2008 09:12:20 -0400
>
> Any comments on this?
Isn't it possible to do this by adding a "normal" unwinder? It should
be properly stacked such that it is checked before the dwarf unwinder
of course. You can check the frame level to short-circuit things the
same way as your diff does.
Adding a hook in the sentinel frame stuff feels wrong...
> Aleksandar Ristovski wrote:
> > Hello,
> > The patch is an attempt to solve the issue from the subject. It
> > introduces a check for in_function_epilogue_p and introduces
> > architecture level prev_register_from_epilogue.
> >
> > The patch is a draft (works but is not complete).
> > Rationale: Dealing with epilogue in frame unwinders needs to be done
> > only in sentinel frame (older frames will never be in epilogue).
> > Comments appreciated.
> >
> >
> > Thanks,
> >
> > Aleksandar Ristovski
> > QNX Software Systems
> >
> >
> > ChangeLog (for reference only):
> >
> > * gdbarch.c, gdbarch.h: Regenerated.
> > * gdbarch.sh: Introduce gdbarch_prev_frame_from_epilogue and provide
> > default_prev_frame_from_epilogue.
> > * i386-tdep.c (i386_in_function_epilogue_p,
> > i386_prev_register_from_epilogue): New functions.
> > (struct frame_unwind_cache): Struct definition.
> > (i386_gdbarch_init): Register i386_prev_register_from_epilogue and
> > i386_in_function_epilogue_p.
> > * sentinel-frame.c (sentinel_frame_prev_register): Check if we are
> > in epilogue and if so, call gdbarch provided prev_frame_from_epilogue.
> > If this returns NULL do as before.
> >
>
>
>
More information about the Gdb
mailing list