Re: gdb code review, pointer madness

NZG
2006-01-26T16:19:12Z

So, if frame 0 is actually the lowest level frame,
would it be correct to say that

for frame->level=0
frame->this_id->value->stack_addr =0

for all time?
Or is this an overgeneralization.

This appears to have to be true since in get_prev_frame

if (this_frame->level >= 0 && !frame_id_p (get_frame_id (this_frame)))

appears to be the only conditional preventing an unwind at level=0 if no
legacy_get_prev_frame is used.

This doesn't seem to be in keeping with the description of the ID
> A frame ID provides an invariant that can be used to re-identify an
> instance of a frame. It is a combination of the frame's `base' and
> the frame's function's code address.

but I'm not seeing anything else in get_prev_frame that would prevent an
unwind.

You shouldn't be able to unwind frame->level=0 should you?

thanks for all your help,
NZG