This is the mail archive of the gdb@sourceware.org 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: Frame lost after 'leave' and before 'ret' instruction on i386?


Any comments on this?

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.





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