Re: Fix a crash when stepping and unwinding fails

Jim Blandy
2006-02-21T22:59:13Z

On 2/21/06, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> But get_current_frame() should be the innermost frame when we execute
> this code. So the prologue analyzer can't be involved here. However,
> yes, it seems that step_frame_idd can end up as null_frame_id, if
> get_current_frame() is also the outermost frame at the same time.

An alternative explanation to Daniel's: the base address in the ID of
frame #0 needs to be the base of the stack frame, so that it won't
change as the function executes and does whatever pushes and pops it
has in mind. The only way to find the base of the stack frame is to
do prologue analysis or consult CFI.