No, the frame in the middle cannot be deleted, because the call stack is a stack. Only the stack pointer pointing to the top of the stack is supported (and, optionally, the frame pointer pointing to the beginning of the last frame). Since the frame is “deleted” (return from the function), only these pointers move and the next highlighted frame overwrites it.
This thread (and several others) explains why longjmp cannot break this behavior. In short, setjmp retains the position of the frame, but if the frame itself was overwritten, this fails. And goto cannot go to another function.
source
share